From 9c6148ab8280c0f4fd8f8d43e7c2526e43ac75f9 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Wed, 15 Apr 2020 15:24:18 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=BE=20=D0=BF=D0=BE=D0=B4=D0=BA=D0=BB=D1=8E=D1=87?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=81=D0=B8=D1=81=D1=82=D0=B5=D0=BC?= =?UTF-8?q?=D0=BD=D1=8B=D1=85=20=D0=BA=D0=B0=D1=82=D0=B0=D0=BB=D0=BE=D0=B3?= =?UTF-8?q?=D0=BE=D0=B2=20=D0=B2=20cotire?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- thirdparty/cotire.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/thirdparty/cotire.cmake b/thirdparty/cotire.cmake index 948ac15..075ec79 100644 --- a/thirdparty/cotire.cmake +++ b/thirdparty/cotire.cmake @@ -931,7 +931,13 @@ function (cotire_add_includes_to_cmd _cmdVar _language _includesVar _systemInclu list (FIND ${_systemIncludesVar} "${_include}" _index) endif() if (_index GREATER -1) - list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_SEP_${_language}}${_include}") + if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang") + string(REPLACE " " "" _flag ${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}) + list (APPEND ${_cmdVar} "${_flag}") + list (APPEND ${_cmdVar} "${_include}") + else() + list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_SEP_${_language}}${_include}") + endif() else() list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_SEP_${_language}}${_include}") endif()