diff options
author | Brad King <brad.king@kitware.com> | 2007-03-12 17:28:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-03-12 17:28:57 (GMT) |
commit | 4b0d362fe92e131646d3b74731319c7227ad1e99 (patch) | |
tree | 82720bca1d3f92904efe2fd86adfab2161d01e91 /Tests/PrecompiledHeader | |
parent | ff220755e2b087df22d8b0ab61e3747a3d76cdc3 (diff) | |
download | CMake-4b0d362fe92e131646d3b74731319c7227ad1e99.zip CMake-4b0d362fe92e131646d3b74731319c7227ad1e99.tar.gz CMake-4b0d362fe92e131646d3b74731319c7227ad1e99.tar.bz2 |
BUG: Do not use /I mode in VS6.
Diffstat (limited to 'Tests/PrecompiledHeader')
-rw-r--r-- | Tests/PrecompiledHeader/CMakeLists.txt | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Tests/PrecompiledHeader/CMakeLists.txt b/Tests/PrecompiledHeader/CMakeLists.txt index 0e19067..7b7f26c 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) |