Selaa lähdekoodia

fix a few COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH issues

master
Sascha Kratky 11 vuotta sitten
vanhempi
commit
3c21d60e8d
1 muutettua tiedostoa jossa 14 lisäystä ja 16 poistoa
  1. +14
    -16
      CMake/cotire.cmake

+ 14
- 16
CMake/cotire.cmake Näytä tiedosto

@@ -1054,8 +1054,8 @@ endfunction()
function (cotire_scan_includes _includesVar) function (cotire_scan_includes _includesVar)
set(_options "") set(_options "")
set(_oneValueArgs COMPILER_ID COMPILER_EXECUTABLE COMPILER_VERSION INCLUDE_SYSTEM_FLAG LANGUAGE UNPARSED_LINES) set(_oneValueArgs COMPILER_ID COMPILER_EXECUTABLE COMPILER_VERSION INCLUDE_SYSTEM_FLAG LANGUAGE UNPARSED_LINES)
set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS,
INCLUDE_PRIORITY_PATH)
set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES
IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS INCLUDE_PRIORITY_PATH)
cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
set (_sourceFiles ${_option_UNPARSED_ARGUMENTS}) set (_sourceFiles ${_option_UNPARSED_ARGUMENTS})
if (NOT _option_LANGUAGE) if (NOT _option_LANGUAGE)
@@ -1105,7 +1105,6 @@ function (cotire_scan_includes _includesVar)
"${_option_IGNORE_EXTENSIONS}" "${_option_IGNORE_EXTENSIONS}"
_includes _unparsedLines _includes _unparsedLines
${_sourceFiles}) ${_sourceFiles})

if (_option_INCLUDE_PRIORITY_PATH) if (_option_INCLUDE_PRIORITY_PATH)
set (_sortedIncludes "") set (_sortedIncludes "")
foreach (_priorityPath ${_option_INCLUDE_PRIORITY_PATH}) foreach (_priorityPath ${_option_INCLUDE_PRIORITY_PATH})
@@ -1116,10 +1115,11 @@ function (cotire_scan_includes _includesVar)
endif() endif()
endforeach() endforeach()
endforeach() endforeach()
list (INSERT _includes 0 "${_sortedIncludes}")
list (REMOVE_DUPLICATES _includes)
if (_sortedIncludes)
list (INSERT _includes 0 ${_sortedIncludes})
list (REMOVE_DUPLICATES _includes)
endif()
endif() endif()

set (${_includesVar} ${_includes} PARENT_SCOPE) set (${_includesVar} ${_includes} PARENT_SCOPE)
if (_option_UNPARSED_LINES) if (_option_UNPARSED_LINES)
set (${_option_UNPARSED_LINES} ${_unparsedLines} PARENT_SCOPE) set (${_option_UNPARSED_LINES} ${_unparsedLines} PARENT_SCOPE)
@@ -1271,8 +1271,8 @@ function (cotire_generate_prefix_header _prefixFile)
set(_options "") set(_options "")
set(_oneValueArgs LANGUAGE COMPILER_EXECUTABLE COMPILER_ID COMPILER_VERSION INCLUDE_SYSTEM_FLAG) set(_oneValueArgs LANGUAGE COMPILER_EXECUTABLE COMPILER_ID COMPILER_VERSION INCLUDE_SYSTEM_FLAG)
set(_multiValueArgs DEPENDS COMPILE_DEFINITIONS COMPILE_FLAGS set(_multiValueArgs DEPENDS COMPILE_DEFINITIONS COMPILE_FLAGS
INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS
INCLUDE_PRIORITY_PATH)
INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES IGNORE_PATH INCLUDE_PATH
IGNORE_EXTENSIONS INCLUDE_PRIORITY_PATH)
cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
if (_option_DEPENDS) if (_option_DEPENDS)
cotire_check_file_up_to_date(_prefixFileIsUpToDate "${_prefixFile}" ${_option_DEPENDS}) cotire_check_file_up_to_date(_prefixFileIsUpToDate "${_prefixFile}" ${_option_DEPENDS})
@@ -3169,7 +3169,7 @@ if (CMAKE_SCRIPT_MODE_FILE)
IGNORE_PATH "${COTIRE_TARGET_IGNORE_PATH};${COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH}" IGNORE_PATH "${COTIRE_TARGET_IGNORE_PATH};${COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH}"
INCLUDE_PATH ${COTIRE_TARGET_INCLUDE_PATH} INCLUDE_PATH ${COTIRE_TARGET_INCLUDE_PATH}
IGNORE_EXTENSIONS "${CMAKE_${COTIRE_TARGET_LANGUAGE}_SOURCE_FILE_EXTENSIONS};${COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS}" IGNORE_EXTENSIONS "${CMAKE_${COTIRE_TARGET_LANGUAGE}_SOURCE_FILE_EXTENSIONS};${COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS}"
INCLUDE_PRIORITY_PATH "${COTIRE_TARGET_INCLUDE_PRIORITY_PATH}"
INCLUDE_PRIORITY_PATH ${COTIRE_TARGET_INCLUDE_PRIORITY_PATH}
INCLUDE_SYSTEM_FLAG "${COTIRE_INCLUDE_SYSTEM_FLAG}" INCLUDE_SYSTEM_FLAG "${COTIRE_INCLUDE_SYSTEM_FLAG}"
INCLUDE_DIRECTORIES ${_includeDirs} INCLUDE_DIRECTORIES ${_includeDirs}
SYSTEM_INCLUDE_DIRECTORIES ${_systemIncludeDirs} SYSTEM_INCLUDE_DIRECTORIES ${_systemIncludeDirs}
@@ -3409,7 +3409,7 @@ else()


define_property( define_property(
DIRECTORY PROPERTY "COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH" DIRECTORY PROPERTY "COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH"
BRIEF_DOCS "Header path matching one of these directories is put at the top of prefix header."
BRIEF_DOCS "Header paths matching one of these directories are put at the top of the prefix header."
FULL_DOCS FULL_DOCS
"See target property COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH." "See target property COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH."
) )
@@ -3501,17 +3501,15 @@ else()
) )


define_property( define_property(
TARGET PROPERTY "COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH"
BRIEF_DOCS "Header path matching one of these directories is put at the top of prefix header."
TARGET PROPERTY "COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH" INHERITED
BRIEF_DOCS "Header paths matching one of these directories are put at the top of prefix header."
FULL_DOCS FULL_DOCS
"The property can be set to a list of directories." "The property can be set to a list of directories."
"Headers files paths matching one of these directories will appear at the begin of generated prefix header."
"Order is kept from the property path order."
"Header file paths matching one of these directories will be inserted at the beginning of the generated prefix header."
"Header files are sorted according to the order of the directories in the property."
"If not set, this property is initialized to the empty list." "If not set, this property is initialized to the empty list."
) )




define_property( define_property(
TARGET PROPERTY "COTIRE_UNITY_SOURCE_PRE_UNDEFS" INHERITED TARGET PROPERTY "COTIRE_UNITY_SOURCE_PRE_UNDEFS" INHERITED
BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file before the inclusion of each target source file." BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file before the inclusion of each target source file."


Ladataan…
Peruuta
Tallenna