|
|
@@ -45,7 +45,7 @@ if (NOT CMAKE_SCRIPT_MODE_FILE) |
|
|
|
endif() |
|
|
|
|
|
|
|
set (COTIRE_CMAKE_MODULE_FILE "${CMAKE_CURRENT_LIST_FILE}") |
|
|
|
set (COTIRE_CMAKE_MODULE_VERSION "1.6.3") |
|
|
|
set (COTIRE_CMAKE_MODULE_VERSION "1.6.4") |
|
|
|
|
|
|
|
include(CMakeParseArguments) |
|
|
|
include(ProcessorCount) |
|
|
@@ -268,9 +268,11 @@ function (cotire_get_target_link_libraries_for_usage_requirements _target _targe |
|
|
|
if (_index LESS 0) |
|
|
|
list (APPEND _targetLinkLibraries ${_library}) |
|
|
|
# process transitive libraries |
|
|
|
get_target_property(_libraries ${_library} INTERFACE_LINK_LIBRARIES) |
|
|
|
if (_libraries) |
|
|
|
list (APPEND _librariesToProcess ${_libraries}) |
|
|
|
if (TARGET ${_library}) |
|
|
|
get_target_property(_libraries ${_library} INTERFACE_LINK_LIBRARIES) |
|
|
|
if (_libraries) |
|
|
|
list (APPEND _librariesToProcess ${_libraries}) |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
endwhile() |
|
|
@@ -391,9 +393,11 @@ function (cotire_get_target_compile_flags _config _language _directory _target _ |
|
|
|
# interface compile options from linked library targets |
|
|
|
cotire_get_target_link_libraries_for_usage_requirements(${_target} _linkLibraries) |
|
|
|
foreach (_library ${_linkLibraries}) |
|
|
|
get_target_property(_targetOptions ${_library} INTERFACE_COMPILE_OPTIONS) |
|
|
|
if (_targetOptions) |
|
|
|
set (_compileFlags "${_compileFlags} ${_targetOptions}") |
|
|
|
if (TARGET ${_library}) |
|
|
|
get_target_property(_targetOptions ${_library} INTERFACE_COMPILE_OPTIONS) |
|
|
|
if (_targetOptions) |
|
|
|
set (_compileFlags "${_compileFlags} ${_targetOptions}") |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
endforeach() |
|
|
|
endif() |
|
|
@@ -464,13 +468,15 @@ function (cotire_get_target_include_directories _config _language _targetSourceD |
|
|
|
# interface include directories from linked library targets |
|
|
|
cotire_get_target_link_libraries_for_usage_requirements(${_target} _linkLibraries) |
|
|
|
foreach (_library ${_linkLibraries}) |
|
|
|
get_target_property(_targetDirs ${_library} INTERFACE_INCLUDE_DIRECTORIES) |
|
|
|
if (_targetDirs) |
|
|
|
list (APPEND _dirs ${_targetDirs}) |
|
|
|
endif() |
|
|
|
get_target_property(_targetDirs ${_library} INTERFACE_SYSTEM_INCLUDE_DIRECTORIES) |
|
|
|
if (_targetDirs) |
|
|
|
list (APPEND _systemIncludeDirs ${_targetDirs}) |
|
|
|
if (TARGET ${_library}) |
|
|
|
get_target_property(_targetDirs ${_library} INTERFACE_INCLUDE_DIRECTORIES) |
|
|
|
if (_targetDirs) |
|
|
|
list (APPEND _dirs ${_targetDirs}) |
|
|
|
endif() |
|
|
|
get_target_property(_targetDirs ${_library} INTERFACE_SYSTEM_INCLUDE_DIRECTORIES) |
|
|
|
if (_targetDirs) |
|
|
|
list (APPEND _systemIncludeDirs ${_targetDirs}) |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
endforeach() |
|
|
|
endif() |
|
|
@@ -519,7 +525,7 @@ macro (cotire_make_C_identifier _identifierVar _str) |
|
|
|
endif() |
|
|
|
string (REGEX REPLACE "[^a-zA-Z0-9]" "_" ${_identifierVar} "${_str}") |
|
|
|
else() |
|
|
|
string (MAKE_C_IDENTIFIER "${_identifierVar}" "${_str}") |
|
|
|
string (MAKE_C_IDENTIFIER "${_str}" "${_identifierVar}") |
|
|
|
endif() |
|
|
|
endmacro() |
|
|
|
|
|
|
@@ -571,9 +577,11 @@ function (cotire_get_target_compile_definitions _config _language _directory _ta |
|
|
|
# interface compile definitions from linked library targets |
|
|
|
cotire_get_target_link_libraries_for_usage_requirements(${_target} _linkLibraries) |
|
|
|
foreach (_library ${_linkLibraries}) |
|
|
|
get_target_property(_definitions ${_library} INTERFACE_COMPILE_DEFINITIONS) |
|
|
|
if (_definitions) |
|
|
|
list (APPEND _configDefinitions ${_definitions}) |
|
|
|
if (TARGET ${_library}) |
|
|
|
get_target_property(_definitions ${_library} INTERFACE_COMPILE_DEFINITIONS) |
|
|
|
if (_definitions) |
|
|
|
list (APPEND _configDefinitions ${_definitions}) |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
endforeach() |
|
|
|
# parse additional compile definitions from target compile flags |
|
|
|