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

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Mar 12 11:45:01 EST 2007


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

Modified Files:
	CMakeLists.txt 
Log Message:
BUG: Clean the pch during make clean so that the test passes when run more than once.


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/PrecompiledHeader/CMakeLists.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CMakeLists.txt	12 Mar 2007 16:35:11 -0000	1.2
+++ CMakeLists.txt	12 Mar 2007 16:44:59 -0000	1.3
@@ -47,6 +47,12 @@
   SET(PCH_TARGETS foo)
 ENDIF(PCH_USE_TARGET)
 
+# Add the PCH to the list of files to clean.  It is created as a
+# side-effect so CMake does not know about it.
+SET_DIRECTORY_PROPERTIES(PROPERTIES
+  ADDITIONAL_MAKE_CLEAN_FILES ${PCH_DIR}/foo_precompiled.pch
+  )
+
 # Setup flags on the two targets to create and use the precompiled header.
 SET_TARGET_PROPERTIES(${PCH_TARGETS} PROPERTIES COMPILE_FLAGS
   "/Yufoo_precompiled.h /FIfoo_precompiled.h ${PCH_FILE}")



More information about the Cmake-commits mailing list