BUG: Clean the pch during make clean so that the test passes when run more than once.

This commit is contained in:
Brad King 2007-03-12 12:44:59 -04:00
parent 03f3411c4f
commit ff220755e2
1 changed files with 6 additions and 0 deletions

View File

@ -47,6 +47,12 @@ ELSE(PCH_USE_TARGET)
SET(PCH_TARGETS foo) SET(PCH_TARGETS foo)
ENDIF(PCH_USE_TARGET) 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. # Setup flags on the two targets to create and use the precompiled header.
SET_TARGET_PROPERTIES(${PCH_TARGETS} PROPERTIES COMPILE_FLAGS SET_TARGET_PROPERTIES(${PCH_TARGETS} PROPERTIES COMPILE_FLAGS
"/Yufoo_precompiled.h /FIfoo_precompiled.h ${PCH_FILE}") "/Yufoo_precompiled.h /FIfoo_precompiled.h ${PCH_FILE}")