Skip to content

Commit

Permalink
cotire 1.3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
sakra committed Mar 6, 2013
1 parent 0ef11ca commit bdc118b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
17 changes: 10 additions & 7 deletions CMake/cotire.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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.3.5")
set (COTIRE_CMAKE_MODULE_VERSION "1.3.6")

include(CMakeParseArguments)

Expand Down Expand Up @@ -1826,7 +1826,7 @@ function (cotire_setup_target_pch_usage _languages _targetSourceDir _target _who
list (LENGTH _prefixFiles _numberOfPrefixFiles)
if (_numberOfPrefixFiles GREATER 1)
cotire_make_prefix_file_path("" ${_target} _prefixHeader)
cotire_setup_combine_command("${_targetSourceDir}" "" "${_prefixHeader}" "${_prefixFiles}" _cmds)
cotire_setup_combine_command("${_targetSourceDir}" "" "${_prefixHeader}" _cmds ${_prefixFiles})
else()
set (_prefixHeader "${_prefixFiles}")
endif()
Expand Down Expand Up @@ -1901,7 +1901,7 @@ function (cotire_setup_prefix_generation_command _language _target _targetSource
if (_numberOfUnityFiles GREATER 1)
# create a joint unity file from all unity file segments
cotire_make_unity_source_file_paths(${_language} ${_target} 0 _unityFile ${_unityFiles})
cotire_setup_combine_command("${_targetSourceDir}" "${_targetScript}" "${_unityFile}" "${_unityFiles}" ${_cmdsVar})
cotire_setup_combine_command("${_targetSourceDir}" "${_targetScript}" "${_unityFile}" ${_cmdsVar} ${_unityFiles})
else()
set (_unityFile "${_unityFiles}")
endif()
Expand All @@ -1924,15 +1924,16 @@ function (cotire_setup_prefix_generation_command _language _target _targetSource
set (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE)
endfunction()

function (cotire_setup_combine_command _sourceDir _targetScript _joinedFile _files _cmdsVar)
function (cotire_setup_combine_command _sourceDir _targetScript _joinedFile _cmdsVar)
set (_files ${ARGN})
set (_filesPaths "")
foreach (_file ${_files})
if (IS_ABSOLUTE "${_file}")
set (_filePath "${_file}")
else()
get_filename_component(_filePath "${_sourceDir}/${_file}" ABSOLUTE)
endif()
file (RELATIVE_PATH _fileRelPath "${CMAKE_BINARY_DIR}" "${_filePath}")
file (RELATIVE_PATH _fileRelPath "${_sourceDir}" "${_filePath}")
if (NOT IS_ABSOLUTE "${_fileRelPath}" AND NOT "${_fileRelPath}" MATCHES "^\\.\\.")
list (APPEND _filesPaths "${_fileRelPath}")
else()
Expand All @@ -1955,7 +1956,7 @@ function (cotire_setup_combine_command _sourceDir _targetScript _joinedFile _fil
COMMAND ${_prefixCmd}
DEPENDS ${_files}
COMMENT "Generating ${_joinedFileRelPath}"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" VERBATIM)
WORKING_DIRECTORY "${_sourceDir}" VERBATIM)
list (APPEND ${_cmdsVar} COMMAND ${_prefixCmd})
set (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE)
endfunction()
Expand Down Expand Up @@ -2168,7 +2169,7 @@ function (cotire_process_target_language _language _configurations _targetSource
# check for user provided prefix header files
get_property(_prefixHeaderFiles TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER_INIT)
if (_prefixHeaderFiles)
cotire_setup_combine_command("${_targetSourceDir}" "${_targetScript}" "${_prefixFile}" "${_prefixHeaderFiles}" _cmds)
cotire_setup_combine_command("${_targetSourceDir}" "${_targetScript}" "${_prefixFile}" _cmds ${_prefixHeaderFiles})
else()
cotire_setup_prefix_generation_command(
${_language} ${_target} "${_targetSourceDir}" "${_targetScript}" "${_prefixFile}" "${_unityFiles}" _cmds ${_unitySourceFiles})
Expand Down Expand Up @@ -3106,4 +3107,6 @@ else()
"Defaults to empty string."
)

message (STATUS "cotire ${COTIRE_CMAKE_MODULE_VERSION} loaded.")

endif()
5 changes: 5 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.3.6 (2013-03-06)

* fix bug with prefix header initialization for generator Xcode.
* print cotire version upon inclusion.

## 1.3.5 (2013-03-01)

* fix typos in function names and property descriptions.
Expand Down

0 comments on commit bdc118b

Please sign in to comment.