From a84d20abe6bc68f8d1a597a22af1ca98d62a5ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Fri, 26 Aug 2016 12:14:12 +0200 Subject: [PATCH] GNU.cmake: replace -isystem by -I MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit since gcc6 we see many c++ based packes failing with: | fatal error: stdlib.h: No such file or directory a fix from gcc is not to expect [1] so work around [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129 Upstream-Status: Pending Signed-off-by: Andreas Müller --- Modules/Compiler/GNU.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake index c2d393d..9d1477d 100644 --- a/Modules/Compiler/GNU.cmake +++ b/Modules/Compiler/GNU.cmake @@ -53,6 +53,10 @@ macro(__compiler_gnu lang) 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 - set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ") + if("${lang}" STREQUAL "CXX") + set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-I ") + else() + set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ") + endif() endif() endmacro() --