[Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.159 1.160 EnforceConfig.cmake.in 1.3 1.4

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Dec 1 09:12:09 EST 2009


Update of /cvsroot/CMake/CMake/Tests
In directory public:/mounts/ram/cvs-serv2414/Tests

Modified Files:
	CMakeLists.txt EnforceConfig.cmake.in 
Log Message:
Always use a configuration for CTestTestTimeout

This test requires that the dashboard script it drives be invoked with
"ctest -C <config> -S ...".  We create a "CTestTest_CONFIG" variable to
hold a configuration selected at test time.  We use the configuration
given to the outer CTest, if any, and then default to either Debug or
the CMAKE_BUILD_TYPE.


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CMakeLists.txt,v
retrieving revision 1.159
retrieving revision 1.160
diff -C 2 -d -r1.159 -r1.160
*** CMakeLists.txt	30 Nov 2009 21:31:27 -0000	1.159
--- CMakeLists.txt	1 Dec 2009 14:12:04 -0000	1.160
***************
*** 23,26 ****
--- 23,32 ----
  ENDIF()
  
+ # Choose a default configuration for CTest tests.
+ SET(CTestTest_CONFIG Debug)
+ IF(NOT CMAKE_CONFIGURATION_TYPES AND CMAKE_BUILD_TYPE)
+   SET(CTestTest_CONFIG ${CMAKE_BUILD_TYPE})
+ ENDIF()
+ 
  # Make sure the 'testing' test gets a proper configuration.
  CONFIGURE_FILE(${CMake_SOURCE_DIR}/Tests/EnforceConfig.cmake.in
***************
*** 1232,1236 ****
      @ONLY ESCAPE_QUOTES)
    ADD_TEST(CTestTestTimeout ${CMAKE_CTEST_COMMAND}
!     -C "\${CTEST_CONFIGURATION_TYPE}"
      -S "${CMake_BINARY_DIR}/Tests/CTestTestTimeout/test.cmake" -V
      --output-log "${CMake_BINARY_DIR}/Tests/CTestTestTimeout/testOutput.log"
--- 1238,1242 ----
      @ONLY ESCAPE_QUOTES)
    ADD_TEST(CTestTestTimeout ${CMAKE_CTEST_COMMAND}
!     -C "\${CTestTest_CONFIG}"
      -S "${CMake_BINARY_DIR}/Tests/CTestTestTimeout/test.cmake" -V
      --output-log "${CMake_BINARY_DIR}/Tests/CTestTestTimeout/testOutput.log"

Index: EnforceConfig.cmake.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/EnforceConfig.cmake.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** EnforceConfig.cmake.in	24 Nov 2009 17:15:33 -0000	1.3
--- EnforceConfig.cmake.in	1 Dec 2009 14:12:07 -0000	1.4
***************
*** 1,2 ****
--- 1,9 ----
+ # 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)
+ 
  # Older versions of CMake do not support an empty configuration name in
  # CTEST_CONFIGURATION_TYPE for the 'testing' test.



More information about the Cmake-commits mailing list