From e9003e3fedd716b7d7c8e7f7e15d4c33b3584f1f Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Tue, 25 Jul 2017 21:09:02 +1000 Subject: cmake: add option to disable -isystem Alternative to #1811, this seems like it should be fixed upstream in gcc/cmake rather than individual packages --- src/cmake-1-fixes.patch | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/cmake-1-fixes.patch b/src/cmake-1-fixes.patch index 59a350b..c6f683a 100644 --- a/src/cmake-1-fixes.patch +++ b/src/cmake-1-fixes.patch @@ -17,3 +17,30 @@ index 1111111..2222222 100644 @@ -1 +1 @@ -set(CMAKE_RC_COMPILE_OBJECT " -O coff ") +set(CMAKE_RC_COMPILE_OBJECT " -O coff ") + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore +Date: Tue, 25 Jul 2017 20:34:56 +1000 +Subject: [PATCH] add option to disable -isystem + +taken from (not accepted): +https://gitlab.kitware.com/cmake/cmake/merge_requests/895 + +see also: +https://gitlab.kitware.com/cmake/cmake/issues/16291 +https://gitlab.kitware.com/cmake/cmake/issues/16919 + + +diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake +index 1111111..2222222 100644 +--- a/Modules/Compiler/GNU.cmake ++++ b/Modules/Compiler/GNU.cmake +@@ -42,7 +42,7 @@ macro(__compiler_gnu lang) + string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG") + set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE " -E > ") + set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE " -S -o ") +- if(NOT APPLE OR NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4) # work around #4462 ++ if(NOT APPLE OR NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4 AND (NOT MXE_DISABLE_INCLUDE_SYSTEM_FLAG)) # work around #4462 + set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ") + endif() + endmacro() -- cgit v0.12