diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2013-05-06 11:09:22 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2013-05-09 17:24:53 (GMT) |
commit | 775225319295c08d2d6d7bb84010e4494d1bc5d0 (patch) | |
tree | 4584a6f3640f8c19c451ddc32ce249604971512e /Tests/CTestTestMemcheck/NoLogDummyChecker | |
parent | abf1df48fc966efc8c2d489acbea24dc0312c84c (diff) | |
download | CMake-775225319295c08d2d6d7bb84010e4494d1bc5d0.zip CMake-775225319295c08d2d6d7bb84010e4494d1bc5d0.tar.gz CMake-775225319295c08d2d6d7bb84010e4494d1bc5d0.tar.bz2 |
Tests: verify that memory checker output files are always present
All supported memory checkers now write their output to a file. Use a dummy
checker that ignores the given filename and ensure that the missing file is
reported as error.
Diffstat (limited to 'Tests/CTestTestMemcheck/NoLogDummyChecker')
-rw-r--r-- | Tests/CTestTestMemcheck/NoLogDummyChecker/CMakeLists.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/CTestTestMemcheck/NoLogDummyChecker/CMakeLists.txt b/Tests/CTestTestMemcheck/NoLogDummyChecker/CMakeLists.txt new file mode 100644 index 0000000..c5aa2cd --- /dev/null +++ b/Tests/CTestTestMemcheck/NoLogDummyChecker/CMakeLists.txt @@ -0,0 +1,17 @@ +# A dummy checker implementation that does not write the requested output file +# so it triggers an error for every checker. + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/ret0.c" "int main(){return 0;}\n") + +foreach(_pseudo IN ITEMS valgrind purify BC) + add_executable(pseudonl_${_pseudo} "${CMAKE_CURRENT_BINARY_DIR}/ret0.c") + set_target_properties(pseudonl_${_pseudo} PROPERTIES OUTPUT_NAME ${_pseudo}) +endforeach() + +# Xcode 2.x forgets to create the output directory before linking +# the individual architectures. +if(CMAKE_OSX_ARCHITECTURES AND XCODE AND NOT "${XCODE_VERSION}" MATCHES "^[^12]") + add_custom_command(TARGET pseudonl_valgrind + PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CFG_INTDIR}" + ) +endif() |