[Orxonox-commit 2584] r7289 - code/trunk/cmake/tools
rgrieder at orxonox.net
rgrieder at orxonox.net
Tue Aug 31 15:26:14 CEST 2010
Author: rgrieder
Date: 2010-08-31 15:26:14 +0200 (Tue, 31 Aug 2010)
New Revision: 7289
Modified:
code/trunk/cmake/tools/PrecompiledHeaderFiles.cmake
Log:
This should actually fix the PCH problem with GCC
Modified: code/trunk/cmake/tools/PrecompiledHeaderFiles.cmake
===================================================================
--- code/trunk/cmake/tools/PrecompiledHeaderFiles.cmake 2010-08-31 12:43:22 UTC (rev 7288)
+++ code/trunk/cmake/tools/PrecompiledHeaderFiles.cmake 2010-08-31 13:26:14 UTC (rev 7289)
@@ -124,15 +124,11 @@
ENDIF()
SET_SOURCE_FILES_PROPERTIES(${_file} PROPERTIES
COMPILE_FLAGS "${_old_flags} -include ${_pch_header_filename}"
- OBJECT_DEPENDS "${_pch_header_file};${_pch_file}"
+ OBJECT_DEPENDS "${_pch_header_file}"
)
ENDIF(NOT _is_header)
ENDFOREACH(_file)
- # Makefile dependency scanner requires the PCH file to be part of the
- # target files in order to work properly
- LIST(APPEND _source_files ${_pch_file})
-
ENDIF()
ENDMACRO(PRECOMPILED_HEADER_FILES_PRE_TARGET)
@@ -160,6 +156,8 @@
IMPLICIT_DEPENDS CXX ${_pch_header_file}
VERBATIM
)
+ ADD_CUSTOM_TARGET(${_target_name}PrecompiledHeader DEPENDS ${_pch_file})
+ ADD_DEPENDENCIES(${_target_name} ${_target_name}PrecompiledHeader)
ENDIF(CMAKE_COMPILER_IS_GNU)
ENDFUNCTION(PRECOMPILED_HEADER_FILES_POST_TARGET)
More information about the Orxonox-commit
mailing list