当您在CMake中option(BUILD_TESTING "Build the testing tree." ON)
时,它包含value(for...)
行:
var fileName = "https://something.something.something/something/filename.abc";
var f = Path.GetFileName(fileName);
我希望默认情况下不构建测试(但在命令行上可以覆盖)。我怎么能这样做?
答案 0 :(得分:4)
啊这似乎可以解决问题:
option(BUILD_TESTING "" OFF)
include(CTest)