本文整理汇总了Python中conans.CMake.definitions["BUILD_TESTING"]方法的典型用法代码示例。如果您正苦于以下问题:Python CMake.definitions["BUILD_TESTING"]方法的具体用法?Python CMake.definitions["BUILD_TESTING"]怎么用?Python CMake.definitions["BUILD_TESTING"]使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类conans.CMake
的用法示例。
在下文中一共展示了CMake.definitions["BUILD_TESTING"]方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: package
# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import definitions["BUILD_TESTING"] [as 别名]
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")
示例2: build
# 需要导入模块: from conans import CMake [as 别名]
# 或者: from conans.CMake import definitions["BUILD_TESTING"] [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)*************")