summaryrefslogtreecommitdiff
path: root/Tests/EnforceConfig.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/EnforceConfig.cmake.in')
-rw-r--r--Tests/EnforceConfig.cmake.in42
1 files changed, 21 insertions, 21 deletions
diff --git a/Tests/EnforceConfig.cmake.in b/Tests/EnforceConfig.cmake.in
index c9028a3..8c0817c 100644
--- a/Tests/EnforceConfig.cmake.in
+++ b/Tests/EnforceConfig.cmake.in
@@ -1,26 +1,26 @@
# Choose a configuration with which to drive CTest tests.
-IF(CTEST_CONFIGURATION_TYPE)
- SET(CTestTest_CONFIG "${CTEST_CONFIGURATION_TYPE}")
-ELSE(CTEST_CONFIGURATION_TYPE)
- SET(CTestTest_CONFIG "@CTestTest_CONFIG@")
-ENDIF(CTEST_CONFIGURATION_TYPE)
+if(CTEST_CONFIGURATION_TYPE)
+ set(CTestTest_CONFIG "${CTEST_CONFIGURATION_TYPE}")
+else()
+ set(CTestTest_CONFIG "@CTestTest_CONFIG@")
+endif()
# Choose a configuration that was built if none is given.
-IF(NOT CTEST_CONFIGURATION_TYPE)
- SET(CTEST_CMD "@CMAKE_CTEST_COMMAND@@CMAKE_EXECUTABLE_SUFFIX@")
- GET_FILENAME_COMPONENT(CTEST_DIR "${CTEST_CMD}" PATH)
- GET_FILENAME_COMPONENT(CTEST_EXE "${CTEST_CMD}" NAME)
- FOREACH(cfg Release Debug MinSizeRel RelWithDebInfo)
- IF(NOT CTEST_CONFIGURATION_TYPE)
- IF(EXISTS "${CTEST_DIR}/${cfg}/${CTEST_EXE}")
- SET(CTEST_CONFIGURATION_TYPE ${cfg})
- ENDIF(EXISTS "${CTEST_DIR}/${cfg}/${CTEST_EXE}")
- ENDIF(NOT CTEST_CONFIGURATION_TYPE)
- ENDFOREACH(cfg)
- IF(NOT CTEST_CONFIGURATION_TYPE)
- SET(CTEST_CONFIGURATION_TYPE NoConfig)
- ENDIF(NOT CTEST_CONFIGURATION_TYPE)
- MESSAGE("Guessing configuration ${CTEST_CONFIGURATION_TYPE}")
-ENDIF(NOT CTEST_CONFIGURATION_TYPE)
+if(NOT CTEST_CONFIGURATION_TYPE)
+ set(CTEST_CMD "@CMAKE_CTEST_COMMAND@@CMAKE_EXECUTABLE_SUFFIX@")
+ get_filename_component(CTEST_DIR "${CTEST_CMD}" PATH)
+ get_filename_component(CTEST_EXE "${CTEST_CMD}" NAME)
+ foreach(cfg Release Debug MinSizeRel RelWithDebInfo)
+ if(NOT CTEST_CONFIGURATION_TYPE)
+ if(EXISTS "${CTEST_DIR}/${cfg}/${CTEST_EXE}")
+ set(CTEST_CONFIGURATION_TYPE ${cfg})
+ endif()
+ endif()
+ endforeach()
+ if(NOT CTEST_CONFIGURATION_TYPE)
+ set(CTEST_CONFIGURATION_TYPE NoConfig)
+ endif()
+ message("Guessing configuration ${CTEST_CONFIGURATION_TYPE}")
+endif()
@TEST_HOME_ENV_CODE@