Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 28, 2011, 9:56:50 PM (13 years ago)
Author:
rgrieder
Message:

Added EXCLUDE_FROM_BUILD_UNITS to the ADD_TARGET commands and implemented it's effects.

Location:
code/branches/unity_build/cmake/tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/unity_build/cmake/tools/BuildUnits.cmake

    r8626 r8649  
    3131    IF(_file MATCHES "\\.(cpp|cc|cxx)$")
    3232      # Some files might be marked as not to compile at all
    33       GET_SOURCE_FILE_PROPERTY(_skip ${_file} HEADER_FILE_ONLY)
    34       IF(NOT _skip)
     33      GET_SOURCE_FILE_PROPERTY(_skip1 ${_file} HEADER_FILE_ONLY)
     34      GET_SOURCE_FILE_PROPERTY(_skip2 ${_file} EXCLUDE_FROM_BUILD_UNITS)
     35      IF(NOT _skip1 AND NOT _skip2)
    3536        GET_SOURCE_FILE_PROPERTY(_size ${_file} BUILD_UNIT_SIZE)
    3637        IF(NOT _size)
  • code/branches/unity_build/cmake/tools/TargetUtilities.cmake

    r8623 r8649  
    5454 #      PCH_EXCLUDE:       Source files to be excluded from PCH support
    5555 #      OUTPUT_NAME:       If you want a different name than the target name
     56 #      EXCLUDE_FROM_BUILD_UNITS: Specifies files that are not put into
     57 #                         automatic (full) build units. They can still
     58 #                         explicitely be included in a BUILD_UNIT (partial)
    5659 #  Note:
    5760 #    This function also installs the target!
     
    9295                  DEFINE_SYMBOL      TOLUA_FILES       PCH_FILE
    9396                  PCH_EXCLUDE        OUTPUT_NAME       LINK_LIBS_LINUX
    94                   LINK_LIBS_WIN32    LINK_LIBS_APPLE   LINK_LIBS_UNIX)
     97                  LINK_LIBS_WIN32    LINK_LIBS_APPLE   LINK_LIBS_UNIX
     98                  EXCLUDE_FROM_BUILD_UNITS)
    9599
    96100  PARSE_MACRO_ARGUMENTS("${_switches}" "${_list_names}" ${ARGN})
     
    177181  # Remove potential duplicates
    178182  LIST(REMOVE_DUPLICATES _${_target_name}_files)
     183
     184  # Mark files to be excluded from build units
     185  IF(_arg_EXCLUDE_FROM_BUILD_UNITS)
     186    SET_SOURCE_FILES_PROPERTIES(${_arg_EXCLUDE_FROM_BUILD_UNITS}
     187      PROPERTIES EXCLUDE_FROM_BUILD_UNITS TRUE)
     188  ENDIF()
    179189
    180190  # Full build units
Note: See TracChangeset for help on using the changeset viewer.