Use this handy cmake variable

This commit is contained in:
David Sansome 2010-06-25 12:34:04 +00:00
parent a0f9c81891
commit 093f198556
1 changed files with 2 additions and 7 deletions

View File

@ -78,13 +78,8 @@ macro(add_test_file test_source gui_required)
target_link_libraries(${TEST_NAME} test_main)
endif (GUI_REQUIRED)
if (WIN32)
add_custom_command(TARGET test POST_BUILD
COMMAND ./${TEST_NAME}.exe)
else (WIN32)
add_custom_command(TARGET test POST_BUILD
COMMAND ./${TEST_NAME})
endif (WIN32)
add_custom_command(TARGET test POST_BUILD
COMMAND ./${TEST_NAME}${CMAKE_EXECUTABLE_SUFFIX})
add_dependencies(build_tests ${TEST_NAME})
endmacro (add_test_file)