2009-12-01 14:12:07 +00:00
|
|
|
# Choose a configuration with which to drive CTest tests.
|
2012-08-13 17:47:32 +00:00
|
|
|
if(CTEST_CONFIGURATION_TYPE)
|
|
|
|
set(CTestTest_CONFIG "${CTEST_CONFIGURATION_TYPE}")
|
2012-08-13 17:50:14 +00:00
|
|
|
else()
|
2012-08-13 17:47:32 +00:00
|
|
|
set(CTestTest_CONFIG "@CTestTest_CONFIG@")
|
2012-08-13 17:50:14 +00:00
|
|
|
endif()
|
2009-12-01 14:12:07 +00:00
|
|
|
|
2009-12-10 16:19:23 +00:00
|
|
|
# Choose a configuration that was built if none is given.
|
2012-08-13 17:47:32 +00:00
|
|
|
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})
|
2012-08-13 17:50:14 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
endforeach()
|
2012-08-13 17:47:32 +00:00
|
|
|
if(NOT CTEST_CONFIGURATION_TYPE)
|
|
|
|
set(CTEST_CONFIGURATION_TYPE NoConfig)
|
2012-08-13 17:50:14 +00:00
|
|
|
endif()
|
2012-08-13 17:47:32 +00:00
|
|
|
message("Guessing configuration ${CTEST_CONFIGURATION_TYPE}")
|
2012-08-13 17:50:14 +00:00
|
|
|
endif()
|
2009-11-23 19:24:53 +00:00
|
|
|
|
2009-11-24 17:15:33 +00:00
|
|
|
@TEST_HOME_ENV_CODE@
|