I am using CMake and Linux to run my test cases from CMakeLists.txt using the following command:
add_custom_command( TARGET tests
POST_BUILD
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tests
)
This only executes if the code has been changed, is there anyway to do this so that it will always run the binary?
For the solution, I had to do this:
add_custom_command( OUTPUT tests.a
POST_BUILD
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tests
)
add_custom_target( runTests
ALL
DPEENDS tests.a
)