當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。