summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-02-08 16:18:21 -0500
committerBrad King <brad.king@kitware.com>2007-02-08 16:18:21 -0500
commit83466bf12eb2dfb51aa2ed49478e543db2530c97 (patch)
tree26abf7b787554937d175cedee5fb93041271504c /Source
parent7fb573d437b300c15ee7d1fc6d1ef6fa077339e4 (diff)
downloadcmake-83466bf12eb2dfb51aa2ed49478e543db2530c97.tar.gz
ENH: Added PrecompiledHeader test for MSVC compilers.
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeLists.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 7298575dc7..735feb6399 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -367,6 +367,18 @@ IF(BUILD_TESTING)
SET(CMAKE_TEST_DIFFERENT_GENERATOR TRUE)
ENDIF(NOT CMAKE_TEST_GENERATOR)
+ # Are we testing with the MSVC compiler?
+ SET(CMAKE_TEST_MSVC 0)
+ IF(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR)
+ SET(CMAKE_TEST_MSVC 1)
+ ELSE(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR)
+ IF("${CMAKE_TEST_GENERATOR}" MATCHES "NMake" OR
+ "${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio")
+ SET(CMAKE_TEST_MSVC 1)
+ ENDIF("${CMAKE_TEST_GENERATOR}" MATCHES "NMake" OR
+ "${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio")
+ ENDIF(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR)
+
SET(CMAKE_TEST_SYSTEM_LIBRARIES 0)
FOREACH(util CURL EXPAT XMLRPC ZLIB)
IF(CMAKE_USE_SYSTEM_${util})
@@ -1008,6 +1020,18 @@ IF(BUILD_TESTING)
)
ENDIF (WIN32)
+ IF(CMAKE_TEST_MSVC)
+ ADD_TEST(PrecompiledHeader ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/PrecompiledHeader"
+ "${CMake_BINARY_DIR}/Tests/PrecompiledHeader"
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-project PrecompiledHeader
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+ --build-two-config
+ --test-command foo)
+ ENDIF(CMAKE_TEST_MSVC)
+
IF("${CMAKE_TEST_GENERATOR}" MATCHES "Makefile")
ADD_TEST(MakeClean ${CMAKE_CTEST_COMMAND}
--build-and-test