我将在我的 C++ 项目中使用带有 CMake/CTest 的 CDash。
为了启用 Cdash 和自定义设置,如 "MEMORYCHECK_SUPPRESSIONS_FILE"、"DART_TESTING_TIMEOUT",我在根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