def validate(self): if not self.options.glsl and \ (self.options.hlsl or self.options.msl or self.options.cpp or self.options.reflect): raise ConanInvalidConfiguration( "hlsl, msl, cpp and reflect require glsl enabled")
def validate(self): if self.settings.arch not in ("x86", "x86_64"): raise ConanInvalidConfiguration( "libcpuid is only available for x86 and x86_64 architecture")
def configure(self): del self.settings.compiler.libcxx if self.settings.compiler == "Visual Studio" \ and int(str(self.settings.compiler.version)) < 14: raise ConanInvalidConfiguration( "Visual Studio >= 14 (2015) is required")
def configure(self): # Verify build configuration if str(self.settings.os_build) != str(self.settings.os): raise ConanInvalidConfiguration("settings.os_build must be equal to settings.os") if str(self.settings.arch_build) != str(self.settings.arch_build): raise ConanInvalidConfiguration("settings.arch_build must be equal to settings.arch_build")
def configure(self): if self.settings.os == "Windows" and \ self.settings.compiler == "Visual Studio" and \ float(self.settings.compiler.version.value) < 14: raise ConanInvalidConfiguration("Double Convertion could not be built by MSVC <14")
def validate(self): if self.settings.os != "Macos": raise ConanInvalidConfiguration(f"{self.name} works only on MacOS")
def configure(self): if self.settings.compiler in ["gcc", "clang"]: if tools.Version(self.settings.compiler.version) < "5.0": raise ConanInvalidConfiguration( "qt 5.15.0 is not support on GCC or clang before 5.0") if conan_version < Version("1.20.0"): raise ConanInvalidConfiguration( "This recipe needs at least conan 1.20.0, please upgrade.") if self.settings.os != 'Linux': # self.options.with_libiconv = False self.options.with_fontconfig = False if self.settings.compiler == "gcc" and Version( self.settings.compiler.version.value) < "5.3": self.options.with_mysql = False if self.settings.os == "Windows": self.options.with_mysql = False if not self.options.shared and self.options.with_icu: raise ConanInvalidConfiguration( "icu option is not supported on windows in static build. see QTBUG-77120." ) if self.options.widgets and not self.options.GUI: raise ConanInvalidConfiguration( "using option qt:widgets without option qt:GUI is not possible. " "You can either disable qt:widgets or enable qt:GUI") if not self.options.GUI: self.options.opengl = "no" self.options.with_vulkan = False self.options.with_freetype = False self.options.with_fontconfig = False self.options.with_harfbuzz = False self.options.with_libjpeg = False self.options.with_libpng = False if not self.options.qtgamepad: self.options.with_sdl2 = False if not self.options.qtmultimedia: self.options.with_libalsa = False self.options.with_openal = False if self.options.qtmultimedia and not self.options.GUI: raise ConanInvalidConfiguration( "Qt multimedia cannot be used without GUI") if self.settings.os != "Linux": self.options.with_libalsa = False if self.options.qtwebengine: if not self.options.shared: raise ConanInvalidConfiguration( "Static builds of Qt Webengine are not supported") if tools.cross_building(self.settings, skip_x64_x86=True): raise ConanInvalidConfiguration( "Cross compiling Qt WebEngine is not supported") if self.settings.compiler == "gcc" and tools.Version( self.settings.compiler.version) < "5": raise ConanInvalidConfiguration( "Compiling Qt WebEngine with gcc < 5 is not supported") if self.settings.os == "Android" and self.options.opengl == "desktop": raise ConanInvalidConfiguration( "OpenGL desktop is not supported on Android. Consider using OpenGL es2" ) if self.settings.os != "Windows" and self.options.opengl == "dynamic": raise ConanInvalidConfiguration( "Dynamic OpenGL is supported only on Windows.") if self.options.with_fontconfig and not self.options.with_freetype: raise ConanInvalidConfiguration( "with_fontconfig cannot be enabled if with_freetype is disabled." ) if self.settings.os == "Macos": del self.settings.os.version if self.options.multiconfiguration: del self.settings.build_type if not self.options.with_doubleconversion and str( self.settings.compiler.libcxx) != "libc++": raise ConanInvalidConfiguration( 'Qt without libc++ needs qt:with_doubleconversion. ' 'Either enable qt:with_doubleconversion or switch to libc++') if tools.os_info.is_linux: if self.options.qtwebengine: self.options.with_fontconfig = True assert self.version == self._submodules['qtbase']['branch'] def _enablemodule(mod): if mod != 'qtbase': setattr(self.options, mod, True) for req in self._submodules[mod]["depends"]: _enablemodule(req) for module in self._submodules: if module != 'qtbase' and getattr(self.options, module): _enablemodule(module)
def configure(self): # check the selected settings if self.settings.os == "Arduino": raise ConanInvalidConfiguration( "This library only compiles on platforms with full STL support." )
def validate(self): if self.settings.compiler == "Visual Studio": if self.options.shared and "MT" in str(self.settings.compiler.runtime): raise ConanInvalidConfiguration("Cannot build shared libsodium libraries with MT(d) runtime")
def validate(self): if self.settings.os == "Windows" and self.options.shared: raise ConanInvalidConfiguration( "Windows shared builds are not supported right now, see issue https://github.com/swift-nav/libsbp/issues/1062" )
def validate(self): if self.settings.compiler == "clang" and self.settings.compiler.version == "6.0" and \ self.settings.build_type == "Release": raise ConanInvalidConfiguration( "OpenCASCADE {} doesn't support Clang 6.0 if Release build type" .format(self.version))
def validate(self): if self.settings.compiler == "gcc" and tools.Version( self.settings.compiler.version) < 7: raise ConanInvalidConfiguration("perfetto requires gcc >= 7") if self.settings.compiler.cppstd: tools.check_min_cppstd(self, 11)
def configure(self): if self.settings.os != "Windows": raise ConanInvalidConfiguration("Only windows supported for Strawberry Perl.")
def configure(self): if self._os == "Macos" and self._arch == "x86": raise ConanInvalidConfiguration("Not supported x86 for OSx")
def validate(self): if hasattr(self, 'settings_build') and tools.cross_building( self, skip_x64_x86=True): raise ConanInvalidConfiguration("Cross-building not implemented")
def validate(self): if self.settings.os == "Macos" and self.settings.arch == "armv8": raise ConanInvalidConfiguration("sorry, M1 builds are not currently supported, give up!")
def configure(self): if self.settings.os not in ("Windows", "Macos", "Linux"): raise ConanInvalidConfiguration("OS is not supported")
def validate(self): if tools.cross_building(self): raise ConanInvalidConfiguration("Cross compiling is not supported by serd's build system Waf.") if is_msvc(self): raise ConanInvalidConfiguration("Don't know how to setup WAF for VS.")
def validate(self): if self.options.shared: raise ConanInvalidConfiguration("Can't build as a shared lib")
def validate(self): if self.settings.os == "Windows": raise ConanInvalidConfiguration( "Windows builds of ImageMagick require MFC which cannot currently be sourced from CCI." )
def configure(self): if not self._supports_compiler(): raise ConanInvalidConfiguration( "llvm-openmp doesn't support compiler: {} on OS: {}.".format( self.settings.compiler, self.settings.os))
def validate(self): if self.options.with_tls != self.options["hiredis"].with_ssl: raise ConanInvalidConfiguration("with_tls must match hiredis.with_ssl option")
def configure(self): if self.options.shared: del self.options.fPIC if self.settings.compiler == "Visual Studio" and self.options.shared: raise ConanInvalidConfiguration("shared is not supported using Visual Studio")
def validate(self): if self.settings.os not in ("Linux", "FreeBSD"): raise ConanInvalidConfiguration( "at-spi2-atk is only supported on Linux and FreeBSD")
def configure(self): if not self.supported_compiler: raise ConanInvalidConfiguration( "magic_enum: Unsupported compiler (https://github.com/Neargye/magic_enum#compiler-compatibility)." )
def _configure_autotools_vars(self): autotools_vars = self._autotools.vars # tweaks for mingw if self._is_mingw: autotools_vars['RCFLAGS'] = '-O COFF' if self.settings.arch == "x86": autotools_vars['RCFLAGS'] += ' --target=pe-i386' else: autotools_vars['RCFLAGS'] += ' --target=pe-x86-64' del autotools_vars['LIBS'] self.output.info("Autotools env vars: " + repr(autotools_vars)) if tools.cross_building(self.settings): if self.settings.os == "iOS": iphoneos = tools.apple_sdk_name(self.settings) ios_dev_target = str(self.settings.os.version).split(".")[0] if self.settings.arch in ["x86", "x86_64"]: autotools_vars['CPPFLAGS'] = "-D__IPHONE_OS_VERSION_MIN_REQUIRED={}0000".format(ios_dev_target) elif self.settings.arch in ["armv7", "armv7s", "armv8"]: autotools_vars['CPPFLAGS'] = "" else: raise ConanInvalidConfiguration("Unsuported iOS arch {}".format(self.settings.arch)) cc = tools.XCRun(self.settings, iphoneos).cc sysroot = "-isysroot {}".format(tools.XCRun(self.settings, iphoneos).sdk_path) if self.settings.arch == "armv8": configure_arch = "arm64" configure_host = "arm" #unused, autodetected else: configure_arch = self.settings.arch configure_host = self.settings.arch #unused, autodetected arch_flag = "-arch {}".format(configure_arch) ios_min_version = tools.apple_deployment_target_flag(self.settings.os, self.settings.os.version) extra_flag = "-Werror=partial-availability" extra_def = " -DHAVE_SOCKET -DHAVE_FCNTL_O_NONBLOCK" # if we debug, maybe add a -gdwarf-2 , but why would we want that? autotools_vars['CC'] = cc autotools_vars['IPHONEOS_DEPLOYMENT_TARGET'] = ios_dev_target autotools_vars['CFLAGS'] = "{} {} {} {}".format( sysroot, arch_flag, ios_min_version, extra_flag ) if self.options.with_openssl: openssl_path = self.deps_cpp_info["openssl"].rootpath openssl_libdir = self.deps_cpp_info["openssl"].libdirs[0] autotools_vars['LDFLAGS'] = "{} {} -L{}/{}".format(arch_flag, sysroot, openssl_path, openssl_libdir) else: autotools_vars['LDFLAGS'] = "{} {}".format(arch_flag, sysroot) autotools_vars['CPPFLAGS'] += extra_def elif self.settings.os == "Android": # nothing do to at the moment, this seems to just work pass return autotools_vars
def validate(self): if self.settings.compiler.get_safe("cppstd"): tools.check_min_cppstd(self, self._minimum_cpp_standard) min_version = self._minimum_compilers_version.get( str(self.settings.compiler)) if not min_version: self.output.warn( "{} recipe lacks information about the {} compiler support.". format(self.name, self.settings.compiler)) else: if tools.Version(self.settings.compiler.version) < min_version: raise ConanInvalidConfiguration( "{} requires C++{} support. The current compiler {} {} does not support it." .format(self.name, self._minimum_cpp_standard, self.settings.compiler, self.settings.compiler.version)) if self.version < "2022.01.31.00" and self.settings.os != "Linux": raise ConanInvalidConfiguration( "Conan support for non-Linux platforms starts with Folly version 2022.01.31.00" ) if self.settings.os == "Macos" and self.settings.arch != "x86_64": raise ConanInvalidConfiguration( "Conan currently requires a 64bit target architecture for Folly on Macos" ) if self.settings.os == "Windows" and self.settings.arch != "x86_64": raise ConanInvalidConfiguration( "Folly requires a 64bit target architecture on Windows") if self.settings.os in ["Macos", "Windows"] and self.options.shared: raise ConanInvalidConfiguration( "Folly could not be built on {} as shared library".format( self.settings.os)) if self.version == "2020.08.10.00" and self.settings.compiler == "clang" and self.options.shared: raise ConanInvalidConfiguration( "Folly could not be built by clang as a shared library") if self.options["boost"].header_only: raise ConanInvalidConfiguration( "Folly could not be built with a header only Boost") miss_boost_required_comp = any( getattr(self.options["boost"], "without_{}".format(boost_comp), True) for boost_comp in self._required_boost_components) if miss_boost_required_comp: raise ConanInvalidConfiguration( "Folly requires these boost components: {}".format(", ".join( self._required_boost_components))) min_version = self._minimum_compilers_version.get( str(self.settings.compiler)) if not min_version: self.output.warn( "{} recipe lacks information about the {} compiler support.". format(self.name, self.settings.compiler)) else: if tools.Version(self.settings.compiler.version) < min_version: raise ConanInvalidConfiguration( "{} requires C++{} support. The current compiler {} {} does not support it." .format(self.name, self._minimum_cpp_standard, self.settings.compiler, self.settings.compiler.version))
def build_requirements(self): if self._with_grpc(): raise ConanInvalidConfiguration("CCI has no grpc recipe (yet)")
def validate(self): if self.options.shared and self._is_msvc: raise ConanInvalidConfiguration("libmad does not support shared library for MSVC")
def configure(self): if self.settings.os == 'Windows' and self.options.shared: raise ConanInvalidConfiguration( 'build as shared lib not supported') if self.options.exceptions and not self.options.rtti: raise ConanInvalidConfiguration('exceptions require rtti support')