From 093f198556d471b51255801a5604afd9bef05865 Mon Sep 17 00:00:00 2001 From: David Sansome Date: Fri, 25 Jun 2010 12:34:04 +0000 Subject: [PATCH] Use this handy cmake variable --- tests/CMakeLists.txt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 975d4f746..e11748cb5 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -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)