CMakeLists.txt 1.2 KB

1234567891011121314151617181920212223242526
  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. include_directories(${CMake_SOURCE_DIR}/Source ${CMake_BINARY_DIR}/Source)
  5. # create binaries that we will use as a pseudo memory checker
  6. add_executable(pseudo_valgrind "${CMAKE_CURRENT_BINARY_DIR}/ret0.cxx")
  7. set_target_properties(pseudo_valgrind PROPERTIES OUTPUT_NAME valgrind)
  8. target_link_libraries(pseudo_valgrind CMakeLib)
  9. add_executable(pseudo_purify "${CMAKE_CURRENT_BINARY_DIR}/ret0.cxx")
  10. set_target_properties(pseudo_purify PROPERTIES OUTPUT_NAME purify)
  11. target_link_libraries(pseudo_purify CMakeLib)
  12. add_executable(pseudo_BC "${CMAKE_CURRENT_BINARY_DIR}/ret0.cxx")
  13. set_target_properties(pseudo_BC PROPERTIES OUTPUT_NAME BC)
  14. target_link_libraries(pseudo_BC CMakeLib)
  15. # binary to be used as pre- and post-memcheck command that fails
  16. add_executable(memcheck_fail "${CMAKE_CURRENT_BINARY_DIR}/ret1.cxx")
  17. target_link_libraries(memcheck_fail CMakeLib)
  18. # Binaries that are used as memchecker that do not write the expected
  19. # output file. Need to be in their own subdirectory as they have the
  20. # same filenames.
  21. add_subdirectory(NoLog)