[Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.78 1.79 EnforceConfig.cmake 1.1 NONE EnforceConfig.cmake.in NONE 1.1
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Jan 5 14:14:27 EST 2009
Update of /cvsroot/CMake/CMake/Tests
In directory public:/mounts/ram/cvs-serv16695/Tests
Modified Files:
CMakeLists.txt
Added Files:
EnforceConfig.cmake.in
Removed Files:
EnforceConfig.cmake
Log Message:
ENH: Re-enable new 'testing' test mode
This fixes selection of a configuration when none is specified to find
an available configuration of the ctest test-command.
--- EnforceConfig.cmake DELETED ---
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CMakeLists.txt,v
retrieving revision 1.78
retrieving revision 1.79
diff -C 2 -d -r1.78 -r1.79
*** CMakeLists.txt 18 Dec 2008 22:15:58 -0000 1.78
--- CMakeLists.txt 5 Jan 2009 19:14:24 -0000 1.79
***************
*** 15,21 ****
# Make sure the 'testing' test gets a proper configuration.
! #SET_DIRECTORY_PROPERTIES(PROPERTIES
! # TEST_INCLUDE_FILE "${CMake_SOURCE_DIR}/Tests/EnforceConfig.cmake"
! # )
# Testing
--- 15,23 ----
# Make sure the 'testing' test gets a proper configuration.
! CONFIGURE_FILE(${CMake_SOURCE_DIR}/Tests/EnforceConfig.cmake.in
! ${CMake_BINARY_DIR}/Tests/EnforceConfig.cmake @ONLY)
! SET_DIRECTORY_PROPERTIES(PROPERTIES
! TEST_INCLUDE_FILE "${CMake_BINARY_DIR}/Tests/EnforceConfig.cmake"
! )
# Testing
***************
*** 543,547 ****
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Tutorial")
! ADD_TEST(testing ${CMAKE_CTEST_COMMAND} # -C \${CTEST_CONFIGURATION_TYPE}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/Testing"
--- 545,549 ----
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Tutorial")
! ADD_TEST(testing ${CMAKE_CTEST_COMMAND} -C \${CTEST_CONFIGURATION_TYPE}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/Testing"
***************
*** 550,556 ****
--build-project Testing
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
! #--test-command ${CMAKE_CTEST_COMMAND} -C \${CTEST_CONFIGURATION_TYPE}
! --build-exe-dir "${CMake_BINARY_DIR}/Tests/Testing/bin"
! --test-command testing
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Testing")
--- 552,556 ----
--build-project Testing
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
! --test-command ${CMAKE_CTEST_COMMAND} -C \${CTEST_CONFIGURATION_TYPE}
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Testing")
--- NEW FILE: EnforceConfig.cmake.in ---
# Older versions of CMake do not support an empty configuration name in
# CTEST_CONFIGURATION_TYPE for the 'testing' test.
SET(CONFIG_REQUIRED)
IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.6)
SET(CONFIG_REQUIRED 1)
ELSE("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.6)
IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" STREQUAL 2.6)
IF("${CMAKE_PATCH_VERSION}" LESS 3)
SET(CONFIG_REQUIRED 1)
ENDIF("${CMAKE_PATCH_VERSION}" LESS 3)
ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" STREQUAL 2.6)
ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.6)
IF(NOT CTEST_CONFIGURATION_TYPE AND CONFIG_REQUIRED)
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 AND CONFIG_REQUIRED)
More information about the Cmake-commits
mailing list