我将在我的C ++项目中使用CDash和CMake / CTest。
为了启用CDash和自定义设置,例如 我在 CMakeLists.txt
set(MEMORYCHECK_SUPPRESSIONS_FILE "${CMAKE_SOURCE_DIR}/valgrind.supp")
set(DART_TESTING_TIMEOUT "120")
include(CTest)
但是,生成的 “DartConfiguration.tcl” 根本不包含我的设置 (MemoryCheckSuppressionFile为空,TimeOut仍为默认值)
我发现,例如,如果我传递-DDART_TESTING_TIMEOUT = STRING:120,它会起作用,但如果在CMakeLists.txt中指定它们则会失败。
提前谢谢你:)
DartConfiguration.tcl
# Dynamic analisys and coverage
PurifyCommand:
ValgrindCommand:
ValgrindCommandOptions:
MemoryCheckCommand: /usr/bin/valgrind
MemoryCheckCommandOptions:
MemoryCheckSuppressionFile:
CoverageCommand: /usr/bin/gcov
# Testing options
# TimeOut is the amount of time in seconds to wait for processes
# to complete during testing. After TimeOut seconds, the
# process will be summaily terminated.
# Currently set to 25 -9.0.0.71596-0inutes
TimeOut: 1500
答案 0 :(得分:2)
有三种可能的解决方案:
您可以创建缓存变量。这也为变量创建了一个GUI条目,这并不总是您想要的自动测试:SET(DART_TESTING_TIMEOUT "120" CACHE STRING "")
您可以使用简单的“set”命令指定选项,但是在名为DartConfig.cmake的文件中,而不是主CMakeLists.txt。解析此文件以创建DartConfiguration.tcl
您使用CTest脚本来设置您的dartclient:http://www.cmake.org/Wiki/CMake_Scripting_Of_CTest