added "IF(ENABLE_CMAKE_TESTING)" to add test only if they have been enabled

This commit is contained in:
tlegrand 2008-02-14 09:08:42 +00:00
commit 25719d800c

View file

@ -85,11 +85,12 @@ FOREACH (test ${TEST_LIST})
ENDFOREACH (test) ENDFOREACH (test)
# Add the tests # Add the tests
FOREACH (test ${TEST_LIST}) IF(ENABLE_CMAKE_TESTING)
ADD_EXECUTABLE(${test} ${T_${test}_SOURCES}) FOREACH (test ${TEST_LIST})
ADD_TEST(${test} ${test}) ADD_EXECUTABLE(${test} ${T_${test}_SOURCES})
TARGET_LINK_LIBRARIES(${test} ga es cma eoutils eo eomoo) ADD_TEST(${test} ${test})
ENDFOREACH (test) TARGET_LINK_LIBRARIES(${test} ga es cma eoutils eo eomoo)
ENDFOREACH (test)
ENDIF(ENABLE_CMAKE_TESTING)
###################################################################################### ######################################################################################