当前位置: 首页>>代码示例>>Python>>正文


Python CMake.build方法代码示例

本文整理汇总了Python中conans.CMake.build方法的典型用法代码示例。如果您正苦于以下问题:Python CMake.build方法的具体用法?Python CMake.build怎么用?Python CMake.build使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在conans.CMake的用法示例。


在下文中一共展示了CMake.build方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: build

# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import build [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()
开发者ID:wdobbe,项目名称:libtftp,代码行数:9,代码来源:conanfile.py

示例2: build

# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import build [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()
开发者ID:hoxnox,项目名称:snappystream,代码行数:9,代码来源:conanfile.py

示例3: build

# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import build [as 别名]
 def build(self):
     cmake=CMake(self)
     cmake.configure(defs={
         'PROJECT_VERSION': self.version
     })
     cmake.configure()
     cmake.build()
开发者ID:Alabuta,项目名称:IslandEngine,代码行数:9,代码来源:conanfile.py

示例4: build

# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import build [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()
开发者ID:Anhouzi,项目名称:FireworksSimulation,代码行数:27,代码来源:conanfile.py

示例5: build

# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import build [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')
开发者ID:sixten-hilborn,项目名称:luabind_cpp11,代码行数:9,代码来源:conanfile.py

示例6: build

# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import build [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)
开发者ID:yuweishan,项目名称:conan-brotli,代码行数:9,代码来源:conanfile.py

示例7: build

# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import build [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()
开发者ID:hklabbers,项目名称:conan-mysqlclient,代码行数:9,代码来源:conanfile.py

示例8: build

# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import build [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()
开发者ID:mpherg,项目名称:sgp4,代码行数:11,代码来源:conanfile.py

示例9: build

# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import build [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()
开发者ID:2gis,项目名称:uniassert,代码行数:11,代码来源:conanfile.py

示例10: do_build

# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import build [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")
开发者ID:hoxnox,项目名称:procman,代码行数:11,代码来源:conanfile.py

示例11: build

# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import build [as 别名]
 def build(self):
     """Configure, build and install FlatBuffers using CMake.
     """
     self._inject_magic_lines()
     cmake = CMake(self)
     cmake.definitions["FLATBUFFERS_BUILD_TESTS"] = False
     cmake.definitions["FLATBUFFERS_BUILD_SHAREDLIB"] = self.options.shared
     cmake.configure()
     cmake.build()
     cmake.install()
开发者ID:royalharsh,项目名称:flatbuffers,代码行数:12,代码来源:conanfile.py

示例12: build

# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import build [as 别名]
    def build(self):
	self.run("export PATH=$PATH:$PWD/../cmake/build/bin")
        cmake = CMake(self)
	
	# Not working?
	#cmake.definitions["CONAN_CMAKE_FIND_ROOT_PATH"] = "../cmake/build"
	
	cmake.verbose = True
        cmake.configure(source_folder="gflags")
        cmake.build()
开发者ID:charlescva,项目名称:common,代码行数:12,代码来源:conanfile.py

示例13: build

# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import build [as 别名]
    def build(self):
        os.mkdir("build")
        tools.replace_in_file("CMakeLists.txt", "project(blosc)", '''project(blosc)
            include(${CMAKE_BINARY_DIR}/../conanbuildinfo.cmake)
            conan_basic_setup(NO_OUTPUT_DIRS)''')
        cmake = CMake(self)
        cmake.definitions["BUILD_TESTS"] = "ON" if self.run_tests else "OFF"
        cmake.definitions["BUILD_BENCHMARKS"] = "ON" if self.run_tests else "OFF"
        cmake.definitions["BUILD_SHARED"] = "ON" if (self.options.shared or self.run_tests) else "OFF"
        cmake.definitions["BUILD_STATIC"] = "OFF" if self.options.shared else "ON"
        cmake.configure(build_folder="build")
        cmake.build()

        if self.run_tests:
            self.output.warn("Running tests!!")
            self.launch_tests()
开发者ID:Blosc,项目名称:bcolz,代码行数:18,代码来源:conanfile.py

示例14: test

# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import build [as 别名]
    def test(self):
        builder = b2.B2(self)
        builder.build_folder = os.path.join(self.build_folder, "base")
        builder.configure()
        builder.build()

        builder = b2.B2(self)
        builder.source_folder = os.path.join(self.source_folder, "pkgconfig")
        builder.build_folder = os.path.join(self.build_folder, "pkgconfig")
        builder.configure()
        builder.build()

        builder = CMake(self)
        builder.configure(
            source_folder=os.path.join(self.source_folder, "cmake"),
            build_folder=os.path.join(self.build_folder, "cmake"),
        )
        builder.build()
开发者ID:grisumbras,项目名称:enum-flags,代码行数:20,代码来源:conanfile.py

示例15: build

# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import build [as 别名]
 def build(self):
     """Build the package."""
     cmake = CMake(self)
     cmake.definitions["BUILD_TESTING"] = False
     cmake.definitions["USE_DBLPREC_AS_REAL"] = True
     cmake.configure(source_folder=".")
     cmake.build()
     print("***********(0.0)*************")
     try:
         # cmake.test()
         tests = False
         print(tests)
     except ConanException:
         raise
     finally:
         if os.path.isfile("TEST-cxxtest.xml"):
             with open("TEST-cxxtest.xml", "r") as f:
                 for line in f.readlines():
                     no_newline = line.strip('\n')
                     print(no_newline)
         print("***********(0.0)*************")
开发者ID:Aquaveo,项目名称:MFLib,代码行数:23,代码来源:conanfile.py


注:本文中的conans.CMake.build方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。