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


Python conans.CMake类代码示例

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


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

示例1: build

 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,代码行数:7,代码来源:conanfile.py

示例2: build

    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,代码行数:25,代码来源:conanfile.py

示例3: build

 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,代码行数:7,代码来源:conanfile.py

示例4: build

 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,代码行数:7,代码来源:conanfile.py

示例5: package

    def package(self):
        cmake = CMake(self)
        cmake.definitions["RANGE_V3_TESTS"] = "OFF"
        cmake.definitions["RANGE_V3_EXAMPLES"] = "OFF"
        cmake.definitions["RANGE_V3_PERF"] = "OFF"
        cmake.definitions["RANGE_V3_DOCS"] = "OFF"
        cmake.definitions["RANGE_V3_HEADER_CHECKS"] = "OFF"
        cmake.configure()
        cmake.install()

        self.copy("LICENSE.txt", dst="licenses", ignore_case=True, keep_path=False)
开发者ID:ericniebler,项目名称:range-v3,代码行数:11,代码来源:conanfile.py

示例6: _configure_cmake

 def _configure_cmake(self):
     cmake = CMake(self)
     cmake.verbose = True
     cmake.definitions["CIVETWEB_ENABLE_SSL"] = self.options.enable_ssl
     cmake.definitions["CIVETWEB_ENABLE_WEBSOCKETS"] = self.options.enable_websockets
     cmake.definitions["CIVETWEB_ENABLE_IPV6"] = self.options.enable_ipv6
     cmake.definitions["CIVETWEB_ENABLE_CXX"] = self.options.enable_cxx
     cmake.definitions["CIVETWEB_BUILD_TESTING"] = False
     cmake.definitions["CIVETWEB_ENABLE_ASAN"] = False
     cmake.configure(build_dir="build_subfolder")
     return cmake
开发者ID:civetweb,项目名称:civetweb,代码行数:11,代码来源:conanfile.py

示例7: build

 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,代码行数:10,代码来源:conanfile.py

示例8: package

 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()
开发者ID:ColinH,项目名称:PEGTL,代码行数:7,代码来源:conanfile.py

示例9: build

 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,代码行数:7,代码来源:conanfile.py

示例10: _configure_cmake

    def _configure_cmake(self):
        cmake = CMake(self)
        defs = {
            'BUILD_SHARED_LIBS': False,
            'CMAKE_BUILD_TYPE': self.settings.build_type,
            'BUILD_TESTS': True,
            'BUILD_VIEWER': self.options.viewer,
            'BUILD_TOOLS': self.options.tools,
            'TESTS_NODATA': not self.options.test_data,
            'USE_CONAN': True,
            'BOOST_STATIC': not self.options['boost'].shared,
        }

        cmake.configure(defs=defs)
        return cmake
开发者ID:christoph-heiss,项目名称:openrw,代码行数:15,代码来源:conanfile.py

示例11: package

    def package(self):
        cmake = CMake(self)
        cmake.definitions["BUILD_TESTING"] = "OFF"
        cmake.definitions["CATCH_INSTALL_DOCS"] = "OFF"
        cmake.definitions["CATCH_INSTALL_HELPERS"] = "ON"
        cmake.configure()
        cmake.install()

        self.copy(pattern="LICENSE.txt", dst="licenses")
开发者ID:77,项目名称:Catch,代码行数:9,代码来源:conanfile.py

示例12: build

 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,代码行数:9,代码来源:conanfile.py

示例13: _configure_cmake

    def _configure_cmake(self):
        cmake = CMake(self)

        cmake.definitions["BENCHMARK_ENABLE_TESTING"] = "OFF"
        cmake.definitions["BENCHMARK_ENABLE_GTEST_TESTS"] = "OFF"
        cmake.definitions["BENCHMARK_ENABLE_LTO"] = "ON" if self.options.enable_lto else "OFF"
        cmake.definitions["BENCHMARK_ENABLE_EXCEPTIONS"] = "ON" if self.options.enable_exceptions else "OFF"

        # See https://github.com/google/benchmark/pull/638 for Windows 32 build explanation
        if self.settings.os != "Windows":
            cmake.definitions["BENCHMARK_BUILD_32_BITS"] = "ON" if "64" not in str(self.settings.arch) else "OFF"
            cmake.definitions["BENCHMARK_USE_LIBCXX"] = "ON" if (str(self.settings.compiler.libcxx) == "libc++") else "OFF"
        else:
            cmake.definitions["BENCHMARK_USE_LIBCXX"] = "OFF"

        cmake.configure(build_folder=self._build_subfolder)
        return cmake
开发者ID:chenshuo,项目名称:benchmark,代码行数:17,代码来源:conanfile.py

示例14: package

 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()
开发者ID:martinmoene,项目名称:status_value,代码行数:7,代码来源:conanfile.py

示例15: build

 def build(self):
     cmake=CMake(self)
     cmake.configure(defs={
         'PROJECT_VERSION': self.version
     })
     cmake.configure()
     cmake.build()
开发者ID:Alabuta,项目名称:IslandEngine,代码行数:7,代码来源:conanfile.py


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