def METHOD_NAME(self):
    if self.settings.os == "Windows" and self.options.shared:
        raise ConanInvalidConfiguration(f"{self.ref} does not support shared build on Windows")
    if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "5":
        # The command line flags set are not supported on older versions of gcc
        raise ConanInvalidConfiguration(
            f"{self.ref} does not support {self.settings.compiler}-{self.settings.compiler.version}"
        )