mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 04:35:53 +00:00
[CMAKE]
* Enable the PCH related warnings globally. svn path=/trunk/; revision=62764
This commit is contained in:
parent
ace39a5f06
commit
6687753892
1 changed files with 2 additions and 1 deletions
|
@ -324,6 +324,7 @@ set(PSEH_LIB "pseh")
|
||||||
|
|
||||||
# Macros
|
# Macros
|
||||||
if(PCH)
|
if(PCH)
|
||||||
|
add_compile_flags("-Winvalid-pch -Werror=invalid-pch")
|
||||||
macro(add_pch _target _pch _sources)
|
macro(add_pch _target _pch _sources)
|
||||||
# When including x.h GCC looks for x.h.gch first
|
# When including x.h GCC looks for x.h.gch first
|
||||||
set(_pch_final_name "${_target}_pch.h")
|
set(_pch_final_name "${_target}_pch.h")
|
||||||
|
@ -351,7 +352,7 @@ if(PCH)
|
||||||
# Include the gch in the specified source files, skipping the pch file itself
|
# Include the gch in the specified source files, skipping the pch file itself
|
||||||
list(REMOVE_ITEM ${_sources} ${_pch})
|
list(REMOVE_ITEM ${_sources} ${_pch})
|
||||||
foreach(_src ${${_sources}})
|
foreach(_src ${${_sources}})
|
||||||
set_property(SOURCE ${_src} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_ccache_flag} -Winvalid-pch -Werror=invalid-pch -include ${_pch_final_name}")
|
set_property(SOURCE ${_src} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_ccache_flag} -include ${_pch_final_name}")
|
||||||
set_property(SOURCE ${_src} APPEND PROPERTY OBJECT_DEPENDS ${_gch})
|
set_property(SOURCE ${_src} APPEND PROPERTY OBJECT_DEPENDS ${_gch})
|
||||||
endforeach()
|
endforeach()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue