diff options
author | Cristian Adam <cristian.adam@gmail.com> | 2020-03-18 19:21:08 +0100 |
---|---|---|
committer | Cristian Adam <cristian.adam@gmail.com> | 2020-03-26 14:24:46 +0100 |
commit | 2ce08e54891054aeba3f273f9970a7fe8fa8b66c (patch) | |
tree | dddfaec9accd7f9d5c0d5cfa1a036cd35e162b4f /Modules/Compiler/GNU.cmake | |
parent | 863b0fa2aca3ece98d177f2dbafcad56f7037c8a (diff) | |
download | cmake-2ce08e54891054aeba3f273f9970a7fe8fa8b66c.tar.gz |
PCH: add an option to disable `-Winvalid-pch`
Fixes: #20295
Diffstat (limited to 'Modules/Compiler/GNU.cmake')
-rw-r--r-- | Modules/Compiler/GNU.cmake | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake index 1c050a297e..3357a86564 100644 --- a/Modules/Compiler/GNU.cmake +++ b/Modules/Compiler/GNU.cmake @@ -114,6 +114,7 @@ macro(__compiler_gnu lang) if (NOT CMAKE_GENERATOR MATCHES "Xcode") set(CMAKE_PCH_PROLOGUE "#pragma GCC system_header") endif() - set(CMAKE_${lang}_COMPILE_OPTIONS_USE_PCH -Winvalid-pch -include <PCH_HEADER>) - set(CMAKE_${lang}_COMPILE_OPTIONS_CREATE_PCH -Winvalid-pch -x ${__pch_header_${lang}} -include <PCH_HEADER>) + set(CMAKE_${lang}_COMPILE_OPTIONS_INVALID_PCH -Winvalid-pch) + set(CMAKE_${lang}_COMPILE_OPTIONS_USE_PCH -include <PCH_HEADER>) + set(CMAKE_${lang}_COMPILE_OPTIONS_CREATE_PCH -x ${__pch_header_${lang}} -include <PCH_HEADER>) endmacro() |