4bef6c5e05b7a28dde519ed835861483b2858036
[platform/upstream/cmake.git] / Tests / CMakeLib / PseudoMemcheck / CMakeLists.txt
1 foreach (_retval 0 1)
2   configure_file("${CMAKE_CURRENT_SOURCE_DIR}/memtester.cxx.in" "${CMAKE_CURRENT_BINARY_DIR}/ret${_retval}.cxx" @ONLY)
3 endforeach ()
4
5 include_directories(${CMake_SOURCE_DIR}/Source ${CMake_BINARY_DIR}/Source)
6
7 # create binaries that we will use as a pseudo memory checker
8 add_executable(pseudo_valgrind "${CMAKE_CURRENT_BINARY_DIR}/ret0.cxx")
9 set_target_properties(pseudo_valgrind PROPERTIES OUTPUT_NAME valgrind)
10 target_link_libraries(pseudo_valgrind CMakeLib)
11
12 add_executable(pseudo_purify "${CMAKE_CURRENT_BINARY_DIR}/ret0.cxx")
13 set_target_properties(pseudo_purify PROPERTIES OUTPUT_NAME purify)
14 target_link_libraries(pseudo_purify CMakeLib)
15 add_executable(pseudo_BC "${CMAKE_CURRENT_BINARY_DIR}/ret0.cxx")
16 set_target_properties(pseudo_BC PROPERTIES OUTPUT_NAME BC)
17 target_link_libraries(pseudo_BC CMakeLib)
18 add_executable(pseudo_cuda-memcheck "${CMAKE_CURRENT_BINARY_DIR}/ret0.cxx")
19 set_target_properties(pseudo_cuda-memcheck PROPERTIES OUTPUT_NAME cuda-memcheck)
20 target_link_libraries(pseudo_cuda-memcheck CMakeLib)
21
22 # binary to be used as pre- and post-memcheck command that fails
23 add_executable(memcheck_fail "${CMAKE_CURRENT_BINARY_DIR}/ret1.cxx")
24 target_link_libraries(memcheck_fail CMakeLib)
25
26 # Binaries that are used as memchecker that do not write the expected
27 # output file. Need to be in their own subdirectory as they have the
28 # same filenames.
29 add_subdirectory(NoLog)