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