Browse Source

cotire 1.1.4

master
Sascha Kratky 11 years ago
parent
commit
95e10831a4
3 changed files with 22 additions and 8 deletions
  1. +16
    -8
      CMake/cotire.cmake
  2. +5
    -0
      HISTORY.md
  3. +1
    -0
      README.md

+ 16
- 8
CMake/cotire.cmake View File

@@ -44,7 +44,7 @@ if (NOT CMAKE_SCRIPT_MODE_FILE)
endif()

set (COTIRE_CMAKE_MODULE_FILE "${CMAKE_CURRENT_LIST_FILE}")
set (COTIRE_CMAKE_MODULE_VERSION "1.1.3")
set (COTIRE_CMAKE_MODULE_VERSION "1.1.4")

include(CMakeParseArguments)

@@ -1680,15 +1680,23 @@ function (cotire_setup_unity_generation_commands _language _target _targetScript
foreach (_unityFile ${_unityFiles})
file (RELATIVE_PATH _unityFileRelPath "${CMAKE_BINARY_DIR}" "${_unityFile}")
set_property (SOURCE "${_unityFile}" PROPERTY GENERATED TRUE)
# set up compiled unity source dependencies
# this ensures that missing source files are generated before the unity file is compiled
if (COTIRE_DEBUG)
message (STATUS "${_unityCmd} OBJECT_DEPENDS ${_dependencySources}")
endif()
if (_dependencySources)
set_property (SOURCE "${_unityFile}" PROPERTY OBJECT_DEPENDS ${_dependencySources})
endif()
cotire_set_cmd_to_prologue(_unityCmd)
list (APPEND _unityCmd -P "${COTIRE_CMAKE_MODULE_FILE}" "unity" "${_targetScript}" "${_unityFile}")
if (COTIRE_DEBUG)
message (STATUS "add_custom_command: OUTPUT ${_unityFile} COMMAND ${_unityCmd} DEPENDS ${_targetScript} ${_dependencySources}")
message (STATUS "add_custom_command: OUTPUT ${_unityFile} COMMAND ${_unityCmd} DEPENDS ${_targetScript}")
endif()
add_custom_command(
OUTPUT "${_unityFile}"
COMMAND ${_unityCmd}
DEPENDS "${_targetScript}" ${_dependencySources}
DEPENDS "${_targetScript}"
COMMENT "Generating ${_language} unity source ${_unityFileRelPath}"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" VERBATIM)
list (APPEND ${_cmdsVar} COMMAND ${_unityCmd})
@@ -2331,15 +2339,15 @@ if (CMAKE_SCRIPT_MODE_FILE)
endif()
endforeach()

if (COTIRE_DEBUG)
message (STATUS "${COTIRE_ARGV0} ${COTIRE_ARGV1} ${COTIRE_ARGV2} ${COTIRE_ARGV3} ${COTIRE_ARGV4} ${COTIRE_ARGV5}")
endif()

# include target script if available
if ("${COTIRE_ARGV2}" MATCHES "\\.cmake$")
include("${COTIRE_ARGV2}")
endif()

if (COTIRE_DEBUG)
message (STATUS "${COTIRE_ARGV0} ${COTIRE_ARGV1} ${COTIRE_ARGV2} ${COTIRE_ARGV3} ${COTIRE_ARGV4} ${COTIRE_ARGV5}")
endif()

if (WIN32)
# for MSVC, compiler IDs may not always be set correctly
if (MSVC)
@@ -2378,7 +2386,7 @@ if (CMAKE_SCRIPT_MODE_FILE)
cotire_generate_unity_source(
"${COTIRE_ARGV3}" ${_sources}
LANGUAGE "${COTIRE_TARGET_LANGUAGE}"
DEPENDS "${COTIRE_ARGV0}" "${COTIRE_ARGV2}" ${COTIRE_TARGET_UNITY_DEPENDS}
DEPENDS "${COTIRE_ARGV0}" "${COTIRE_ARGV2}"
SOURCES_COMPILE_DEFINITIONS ${_sourcesDefinitions}
PRE_UNDEFS ${_targetPreUndefs}
POST_UNDEFS ${_targetPostUndefs}


+ 5
- 0
HISTORY.md View File

@@ -1,3 +1,8 @@
## 1.1.4 (2012-08-15)

* prevent redundant re-generation of the unity source, prefix header and precompiled header files
(this makes cotire more applicable to C++ projects that use Qt).

## 1.1.3 (2012-08-12)

* fix out of range index operation upon building list of target include directories.


+ 1
- 0
README.md View File

@@ -21,6 +21,7 @@ features
* Leverages native precompiled header generation features of IDEs (Visual Studio and Xcode).
* Compatible with CMake's [cross-compiling][ccrc] support.
* Compatible with compiler wrappers like [ccache][ccch].
* Applicable to CMake based Qt projects.
* Tested with Windows, Linux and OS X.
* MIT licensed.



Loading…
Cancel
Save