[cmake-commits] king committed CMakeLists.txt 1.3 1.4

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Mar 12 12:28:59 EST 2007


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

Modified Files:
	CMakeLists.txt 
Log Message:
BUG: Do not use /I mode in VS6.


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/PrecompiledHeader/CMakeLists.txt,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CMakeLists.txt	12 Mar 2007 16:44:59 -0000	1.3
+++ CMakeLists.txt	12 Mar 2007 17:28:57 -0000	1.4
@@ -13,22 +13,25 @@
 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)



More information about the Cmake-commits mailing list