aboutsummaryrefslogtreecommitdiff
path: root/modules/ECMAddTests.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'modules/ECMAddTests.cmake')
-rw-r--r--modules/ECMAddTests.cmake3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/ECMAddTests.cmake b/modules/ECMAddTests.cmake
index 6cc20b65..d60d069b 100644
--- a/modules/ECMAddTests.cmake
+++ b/modules/ECMAddTests.cmake
@@ -63,12 +63,11 @@ function(ecm_add_test)
message(FATAL_ERROR "ecm_add_test() called with multiple source files but without setting \"TEST_NAME\"")
endif()
- set(_testname "${ECM_ADD_TEST_NAME_PREFIX}${_testname}")
add_executable(${_testname} ${_sources})
if(NOT ECM_ADD_TEST_GUI)
ecm_mark_nongui_executable(${_testname})
endif()
- add_test(NAME ${_testname} COMMAND ${_testname})
+ add_test(NAME "${ECM_ADD_TEST_NAME_PREFIX}${_testname} COMMAND ${_testname})
target_link_libraries(${_testname} ${ECM_ADD_TEST_LINK_LIBRARIES})
ecm_mark_as_test(${_testname})
endfunction()