本文整理汇总了Python中conans.CMake.configure方法的典型用法代码示例。如果您正苦于以下问题:Python CMake.configure方法的具体用法?Python CMake.configure怎么用?Python CMake.configure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类conans.CMake
的用法示例。
在下文中一共展示了CMake.configure方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: build
# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import configure [as 别名]
def build(self):
cmake=CMake(self)
cmake.configure(defs={
'PROJECT_VERSION': self.version
})
cmake.configure()
cmake.build()
示例2: build
# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import configure [as 别名]
def build(self):
if self.settings.compiler == "Visual Studio" and self.settings.compiler.version != 12:
self.settings.compiler.version = 12
cmake = CMake(self)
cmake.definitions["MYSQL_MAINTAINER_MODE"]=0
cmake.configure(source_folder="mysqlclient", build_folder="mysqlclient/build")
cmake.build()
示例3: package
# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import configure [as 别名]
def package(self):
cmake = CMake(self)
cmake.definitions["PEGTL_BUILD_TESTS"] = "OFF"
cmake.definitions["PEGTL_BUILD_EXAMPLES"] = "OFF"
cmake.definitions["PEGTL_INSTALL_DOC_DIR"] = "licenses"
cmake.configure()
cmake.install()
示例4: build
# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import configure [as 别名]
def build(self):
cmake = CMake(self)
cmake.definitions["CMAKE_TOOLCHAIN_FILE"] = os.path.join(os.getcwd(), 'conan_paths.cmake')
cmake.definitions["BUILD_SHARED_LIBS"] = self.options.shared
cmake.configure()
cmake.build()
cmake.install()
示例5: build
# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import configure [as 别名]
def build(self):
cmake = CMake(self)
cmake.configure(defs={"BROTLI_BUNDLED_MODE":"ON"})
pattern = "brotli%s"
if not self.options.shared: pattern += "-static"
for libname in ["dec", "enc"]:
cmake.build(target=pattern % libname)
示例6: build
# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import configure [as 别名]
def build(self):
if self.settings.os == "Windows" and self.version == "master":
raise ConanException("Trunk builds are not supported on Windows (cannot build directly from master git repository).")
if self.settings.compiler == "Visual Studio":
env = VisualStudioBuildEnvironment(self)
with tools.environment_append(env.vars):
version = min(12, int(self.settings.compiler.version.value))
version = 10 if version == 11 else version
cd_build = "cd %s\\%s\\build\\vc%s" % (self.conanfile_directory, self.source_directory, version)
build_command = build_sln_command(self.settings, "glew.sln")
vcvars = vcvars_command(self.settings)
self.run("%s && %s && %s" % (vcvars, cd_build, build_command.replace("x86", "Win32")))
else:
if self.settings.os == "Windows":
replace_in_file("%s/build/cmake/CMakeLists.txt" % self.source_directory, \
"if(WIN32 AND (NOT MSVC_VERSION LESS 1600)", \
"if(WIN32 AND MSVC AND (NOT MSVC_VERSION LESS 1600)")
if self.version == "master":
self.run("make extensions")
cmake = CMake(self)
cmake.configure(source_dir="%s/build/cmake" % self.source_directory, defs={"BUILD_UTILS": "OFF"})
cmake.build()
示例7: _configure_cmake
# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import configure [as 别名]
def _configure_cmake(self):
cmake = CMake(self)
cmake.definitions['VERSION']=self.version
cmake.definitions['PLATFORM']=self.options.platform
cmake.definitions['SMP']=self.options.smp
cmake.configure(source_folder=self.source_folder)
return cmake
示例8: build
# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import configure [as 别名]
def build(self):
cmake = CMake(self)
cmake.definitions['CMAKE_INSTALL_PREFIX'] = os.path.join(self.conanfile_directory, 'install')
cmake.definitions['BUILD_TEST'] = False
cmake.definitions['BUILD_SHARED'] = self.options.shared
cmake.configure(build_dir='_build')
cmake.build(target='install')
示例9: build
# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import configure [as 别名]
def build(self):
cmake = CMake(self)
cmake.definitions["WITH_BOOST_IOSTREAMS"] = self.options.boost_iostreams
cmake.definitions["WITH_CONAN"] = True
cmake.configure()
cmake.build()
cmake.install()
示例10: build
# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import configure [as 别名]
def build(self):
cmake = CMake(self)
# Configure which parts to build
cmake.definitions["VCL_BUILD_BENCHMARKS"] = False
cmake.definitions["VCL_BUILD_TESTS"] = False
cmake.definitions["VCL_BUILD_TOOLS"] = False
cmake.definitions["VCL_BUILD_EXAMPLES"] = False
# Support multi-package configuration
#cmake.definitions["CMAKE_DEBUG_POSTFIX"] = "_d"
# Configure features
cmake.definitions["VCL_VECTORIZE"] = str(self.options.vectorization)
cmake.definitions["VCL_OPENGL_SUPPORT"] = True
if self.settings.os != "Windows":
cmake.definitions["CMAKE_POSITION_INDEPENDENT_CODE"] = self.options.fPIC
# Configure external targets
cmake.definitions["vcl_ext_absl"] = "CONAN_PKG::abseil"
cmake.definitions["vcl_ext_eigen"] = "CONAN_PKG::eigen"
cmake.definitions["vcl_ext_fmt"] = "CONAN_PKG::fmt"
cmake.definitions["vcl_ext_glew"] = "CONAN_PKG::glew"
cmake.configure(source_dir=self.source_folder + "/src/")
if cmake.is_multi_configuration:
cmake.build(target="vcl_core", args=["--config","Debug"])
cmake.build(target="vcl_geometry", args=["--config","Debug"])
cmake.build(target="vcl_graphics", args=["--config","Debug"])
cmake.build(target="vcl_math", args=["--config","Debug"])
cmake.build(target="vcl_core", args=["--config","Release"])
cmake.build(target="vcl_geometry", args=["--config","Release"])
cmake.build(target="vcl_graphics", args=["--config","Release"])
cmake.build(target="vcl_math", args=["--config","Release"])
else:
cmake.build(target="vcl_core")
cmake.build(target="vcl_geometry")
cmake.build(target="vcl_graphics")
cmake.build(target="vcl_math")
示例11: package
# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import configure [as 别名]
def package(self):
"""Run CMake install"""
cmake = CMake(self)
cmake.definitions["NSSV_OPT_BUILD_TESTS"] = "OFF"
cmake.definitions["NSSV_OPT_BUILD_EXAMPLES"] = "OFF"
cmake.configure()
cmake.install()
示例12: _configure_cmake
# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import configure [as 别名]
def _configure_cmake(self):
cmake = CMake(self)
cmake.definitions["TAOPQ_BUILD_TESTS"] = False
cmake.definitions["TAOPQ_INSTALL_DOC_DIR"] = "licenses"
if self.settings.os == 'Windows' and self.settings.compiler == 'Visual Studio':
cmake.definitions["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = self.options.shared
cmake.configure()
return cmake
示例13: build
# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import configure [as 别名]
def build(self):
cmake = CMake(self)
cmake.definitions["BUILD_SHARED_LIBS"] = "ON" if self.options.shared else "OFF"
cmake.definitions["CMAKE_POSITION_INDEPENDENT_CODE"] = "ON" if self.options.fpic else "OFF"
cmake.definitions["CONAN_SYSTEM_INCLUDES"] = "ON"
if os.path.exists(self.source_folder + "/sgp4/conanfile.py"):
self.src_dir = self.source_folder + "/sgp4"
cmake.configure(source_dir=self.src_dir, build_dir=".")
cmake.build()
示例14: do_build
# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import configure [as 别名]
def do_build(self):
cmake = CMake(self)
cmake.build_dir = "{staging_dir}/src".format(staging_dir=self.staging_dir)
tools.untargz("procman-{v}.tar.gz".format(v=self.version), cmake.build_dir)
cmake.configure(defs={
"CMAKE_INSTALL_PREFIX": self.staging_dir,
"CMAKE_INSTALL_LIBDIR": "lib"
}, source_dir="procman-{v}".format(v=self.version))
cmake.build(target="install")
示例15: build
# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import configure [as 别名]
def build(self):
cmake = CMake(self)
configure_args = {
'args': ['-DUNIASSERT_TESTS=ON', ] if self.develop else None,
'source_dir': self.source_subdir(),
}
cmake.configure(**configure_args)
cmake.build()
cmake.test()