summaryrefslogtreecommitdiff
path: root/Tests/PrecompiledHeader
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-03-12 13:28:57 -0400
committerBrad King <brad.king@kitware.com>2007-03-12 13:28:57 -0400
commit4b0d362fe92e131646d3b74731319c7227ad1e99 (patch)
tree82720bca1d3f92904efe2fd86adfab2161d01e91 /Tests/PrecompiledHeader
parentff220755e2b087df22d8b0ab61e3747a3d76cdc3 (diff)
downloadcmake-4b0d362fe92e131646d3b74731319c7227ad1e99.tar.gz
BUG: Do not use /I mode in VS6.
Diffstat (limited to 'Tests/PrecompiledHeader')
-rw-r--r--Tests/PrecompiledHeader/CMakeLists.txt17
1 files changed, 10 insertions, 7 deletions
diff --git a/Tests/PrecompiledHeader/CMakeLists.txt b/Tests/PrecompiledHeader/CMakeLists.txt
index 0e19067781..7b7f26ca4d 100644
--- a/Tests/PrecompiledHeader/CMakeLists.txt
+++ b/Tests/PrecompiledHeader/CMakeLists.txt
@@ -13,22 +13,25 @@ ELSE(CMAKE_CONFIGURATION_TYPES)
ENDIF(CMAKE_CONFIGURATION_TYPES)
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/PCH)
+# The VS6 IDE does not support renaming .pch files so we cannot use a
+# separate target.
+IF("${CMAKE_GENERATOR}" MATCHES "Visual Studio 6")
+ SET(PCH_USE_TARGET 0)
+ SET(PCH_USE_INCLUDE_DIR 1)
+ELSE("${CMAKE_GENERATOR}" MATCHES "Visual Studio 6")
+ SET(PCH_USE_TARGET 1)
+ SET(PCH_USE_INCLUDE_DIR 0)
+ENDIF("${CMAKE_GENERATOR}" MATCHES "Visual Studio 6")
+
# Choose between an explicit include path and using /I during
# precompilation. The /I form is used to test that the PCH is
# actually used. In practice the include path form would be used.
-SET(PCH_USE_INCLUDE_DIR 0)
IF(PCH_USE_INCLUDE_DIR)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
ELSE(PCH_USE_INCLUDE_DIR)
SET(PCH_INCLUDE_DIR "\"/I${CMAKE_CURRENT_SOURCE_DIR}/include\"")
ENDIF(PCH_USE_INCLUDE_DIR)
-# The VS6 IDE does not support renaming .pch files so we cannot use a
-# separate target.
-IF(NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio 6")
- SET(PCH_USE_TARGET 1)
-ENDIF(NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio 6")
-
# Create a target that will use a precompiled header.
SET(foo_SRCS foo1.c foo2.c)
IF(PCH_USE_TARGET)