|
|
|
@@ -678,8 +678,23 @@ function (cotire_get_target_compiler_flags _config _language _target _compilerFl |
|
|
|
# parse target compile flags omitting compile definitions and include directives |
|
|
|
set (_targetFlags "") |
|
|
|
cotire_get_target_compile_flags("${_config}" "${_language}" "${_target}" _targetFlags) |
|
|
|
set (_flagFilter "D") |
|
|
|
if (CMAKE_INCLUDE_FLAG_${_language}) |
|
|
|
string (STRIP "${CMAKE_INCLUDE_FLAG_${_language}}" _includeFlag) |
|
|
|
string (REGEX REPLACE "^[-/]+" "" _includeFlag "${_includeFlag}") |
|
|
|
if (_includeFlag) |
|
|
|
set (_flagFilter "${_flagFilter}|${_includeFlag}") |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
if (CMAKE_INCLUDE_SYSTEM_FLAG_${_language}) |
|
|
|
string (STRIP "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}" _includeFlag) |
|
|
|
string (REGEX REPLACE "^[-/]+" "" _includeFlag "${_includeFlag}") |
|
|
|
if (_includeFlag) |
|
|
|
set (_flagFilter "${_flagFilter}|${_includeFlag}") |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
set (_compilerFlags "") |
|
|
|
cotire_filter_compile_flags("${_language}" "[ID]" _ignore _compilerFlags ${_targetFlags}) |
|
|
|
cotire_filter_compile_flags("${_language}" "${_flagFilter}" _ignore _compilerFlags ${_targetFlags}) |
|
|
|
if (COTIRE_DEBUG AND _compilerFlags) |
|
|
|
message (STATUS "Target ${_target} compiler flags: ${_compilerFlags}") |
|
|
|
endif() |
|
|
|
|