Ver a proveniência

Fix `-isystem` includes being incorrectly passed to execute_process()

The external command was being invoked with arguments: ["clang", ...,
"-isystem  /foo/bar/baz", ...], which meant that the compiler treated
the whitespace between the flag and the path as being part of the path
itself. (i.e. it was looking for "  /foo/bar/baz").

Fixed by passing the argument to execute_process() as
'-isystem/foo/bar/baz'; I also needed to ensure we normalized the value
of CMAKE_INCLUDE_SYSTEM_FLAG_<LANG>, which itself contains trailing
whitespace in some cases.
master
Nicholas Hutchinson há 9 anos
ascendente
cometimento
d8a2560c31
1 ficheiros alterados com 2 adições e 2 eliminações
  1. +2
    -2
      CMake/cotire.cmake

+ 2
- 2
CMake/cotire.cmake Ver ficheiro

@@ -759,7 +759,7 @@ macro (cotire_add_includes_to_cmd _cmdVar _language _includeSystemFlag _includes
else()
list(FIND ${_systemIncludesVar} ${_include} _index)
if(_index GREATER -1 AND NOT "${_includeSystemFlag}" STREQUAL "")
list (APPEND ${_cmdVar} "${_includeSystemFlag} ${_include}")
list (APPEND ${_cmdVar} "${_includeSystemFlag}${_include}")
else()
list (APPEND ${_cmdVar} "-I${_include}")
endif()
@@ -1922,7 +1922,7 @@ function (cotire_generate_target_script _language _configurations _targetSourceD
get_target_property(COTIRE_TARGET_MAXIMUM_NUMBER_OF_INCLUDES ${_target} COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES)
cotire_get_source_files_undefs(COTIRE_UNITY_SOURCE_PRE_UNDEFS COTIRE_TARGET_SOURCES_PRE_UNDEFS ${COTIRE_TARGET_SOURCES})
cotire_get_source_files_undefs(COTIRE_UNITY_SOURCE_POST_UNDEFS COTIRE_TARGET_SOURCES_POST_UNDEFS ${COTIRE_TARGET_SOURCES})
set (COTIRE_INCLUDE_SYSTEM_FLAG ${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}})
string (STRIP "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}" COTIRE_INCLUDE_SYSTEM_FLAG)
set (COTIRE_TARGET_CONFIGURATION_TYPES "${_configurations}")
foreach (_config ${_configurations})
string (TOUPPER "${_config}" _upperConfig)


Carregando…
Cancelar
Guardar