【发布时间】:2017-01-24 16:09:10
【问题描述】:
当您在 CMake 中执行 include(CTest) 时,它包含 this 行:
option(BUILD_TESTING "Build the testing tree." ON)
我希望默认情况下不构建测试(但可以在命令行上覆盖)。我该怎么做?
【问题讨论】:
当您在 CMake 中执行 include(CTest) 时,它包含 this 行:
option(BUILD_TESTING "Build the testing tree." ON)
我希望默认情况下不构建测试(但可以在命令行上覆盖)。我该怎么做?
【问题讨论】:
啊,这似乎可以解决问题:
option(BUILD_TESTING "" OFF)
include(CTest)
【讨论】: