From b9a5113a4a80425c28ec1380f13c5dc4e0001c66 Mon Sep 17 00:00:00 2001 From: Sascha Kratky Date: Sat, 28 Sep 2013 14:20:09 +0200 Subject: [PATCH] cotire 1.4.3 --- CMake/cotire.cmake | 10 ++++++---- HISTORY.md | 5 +++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CMake/cotire.cmake b/CMake/cotire.cmake index a381a69..77ffa5b 100644 --- a/CMake/cotire.cmake +++ b/CMake/cotire.cmake @@ -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.4.2") +set (COTIRE_CMAKE_MODULE_VERSION "1.4.3") include(CMakeParseArguments) include(ProcessorCount) @@ -167,7 +167,7 @@ function (cotire_filter_language_source_files _language _sourceFilesVar _exclude get_source_file_property(_sourceIsCotired "${_sourceFile}" COTIRE_TARGET) get_source_file_property(_sourceCompileFlags "${_sourceFile}" COMPILE_FLAGS) if (COTIRE_DEBUG) - message (STATUS "${_sourceFile} excluded=${_sourceIsExcluded} cotired=${_sourceIsCotired}") + message (STATUS "${_sourceFile} excluded=${_sourceIsExcluded} cotired=${_sourceIsCotired} compileFlags=${_sourceCompileFlags}") endif() if (_sourceIsCotired) list (APPEND _cotiredSourceFiles "${_sourceFile}") @@ -1788,7 +1788,7 @@ function (cotire_generate_target_script _language _configurations _targetSourceD set (${_targetScriptVar} "${_targetCotireScript}" PARENT_SCOPE) endfunction() -function (cotire_setup_pch_file_compilation _language _targetBinaryDir _targetScript _prefixFile _pchFile) +function (cotire_setup_pch_file_compilation _language _target _targetSourceDir _targetScript _prefixFile _pchFile) set (_sourceFiles ${ARGN}) if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") # for Visual Studio and Intel, we attach the precompiled header compilation to the first source file @@ -1806,6 +1806,8 @@ function (cotire_setup_pch_file_compilation _language _targetBinaryDir _targetSc set_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_OUTPUTS "${_pchFile}") # make first source file depend on prefix header set_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_DEPENDS "${_prefixFile}") + # mark first source file as cotired to prevent it from being used in another cotired target + set_property (SOURCE ${_hostFile} PROPERTY COTIRE_TARGET "${_target}") endif() elseif ("${CMAKE_GENERATOR}" MATCHES "Makefiles|Ninja") # for makefile based generator, we add a custom command to precompile the prefix header @@ -2303,7 +2305,7 @@ function (cotire_process_target_language _language _configurations _targetSource cotire_make_pch_file_path(${_language} "${_targetSourceDir}" ${_target} _pchFile) if (_pchFile) cotire_setup_pch_file_compilation( - ${_language} "${_targetBinaryDir}" "${_targetScript}" "${_prefixFile}" "${_pchFile}" ${_sourceFiles}) + ${_language} ${_target} "${_targetSourceDir}" "${_targetScript}" "${_prefixFile}" "${_pchFile}" ${_sourceFiles}) if (_excludedSources) set (_wholeTarget FALSE) endif() diff --git a/HISTORY.md b/HISTORY.md index b669479..b20f192 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,8 @@ +## 1.4.3 (2013-09-28) + +* fixed bug with generation of unity source file when `COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES` is + set to 0. + ## 1.4.2 (2013-08-24) * CMake 2.8.11 compatibility fixes.