Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 24, 2011, 4:15:19 AM (14 years ago)
Author:
rgrieder
Message:

Renamed the infamous 'Compilation' to 'BuildUnit' which definitely suits better and avoids much of the general confusion.
There are no actual changes, just the renaming.

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

Legend:

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

    r7818 r8558  
    2525 #                             adds the current directory.
    2626 #                             Also compiles multiple source files into a single
    27  #                             one by including them
    28  #                             Use COMPILATION_[BEGIN|END] in
     27 #                             translation unit (faster)
     28 #                             Use [END_]BUILD_UNIT in
    2929 #                             [ADD|SET]_SOURCE_FILES and specify the name of
    30  #                             the new source file after COMPILATION_BEGIN
     30 #                             the new source file after BUILD_UNIT
    3131 #    GET_ALL_HEADER_FILES   - Finds all header files recursively.
    3232 #    GENERATE_SOURCE_GROUPS - Set Visual Studio source groups.
     
    3636  SET(_source_files)
    3737  FOREACH(_file ${ARGN})
    38     IF(_file MATCHES "^(COMPILATION_BEGIN|COMPILATION_END)$")
     38    IF(_file MATCHES "^(BUILD_UNIT|END_BUILD_UNIT)$")
    3939      # Append keywords verbatim
    4040      LIST(APPEND _source_files ${_file})
  • code/branches/unity_build/cmake/tools/TargetUtilities.cmake

    r8421 r8558  
    9595  PARSE_MACRO_ARGUMENTS("${_switches}" "${_list_names}" ${ARGN})
    9696
    97   # Process source files with support for compilations
     97  # Process source files with support for build units
    9898  # Note: All file paths are relative to the root source directory, even the
    99   #       name of the compilation file.
     99  #       name of the build unit.
    100100  SET(_${_target_name}_source_files)
    101   SET(_get_compilation_file FALSE)
    102   SET(_add_to_compilation FALSE)
     101  SET(_get_build_unit_file FALSE)
     102  SET(_add_to_build_unit FALSE)
    103103  FOREACH(_file ${_arg_SOURCE_FILES})
    104     IF(_file STREQUAL "COMPILATION_BEGIN")
    105       # Next file is the name of the compilation
    106       SET(_get_compilation_file TRUE)
    107     ELSEIF(_file STREQUAL "COMPILATION_END")
    108       IF(NOT _compilation_file)
    109         MESSAGE(FATAL_ERROR "No name provided for source file compilation")
    110       ENDIF()
    111       IF(NOT DISABLE_COMPILATIONS)
    112         IF(NOT _compilation_include_string)
    113           MESSAGE(STATUS "Warning: Empty source file compilation!")
    114         ENDIF()
    115         IF(EXISTS ${_compilation_file})
    116           FILE(READ ${_compilation_file} _include_string_file)
    117         ENDIF()
    118         IF(NOT _compilation_include_string STREQUAL "${_include_string_file}")
    119           FILE(WRITE ${_compilation_file} "${_compilation_include_string}")
    120         ENDIF()
    121         LIST(APPEND _${_target_name}_source_files ${_compilation_file})
    122       ENDIF()
    123       SET(_add_to_compilation FALSE)
    124     ELSEIF(_get_compilation_file)
    125       SET(_compilation_file ${CMAKE_BINARY_DIR}/${_file})
    126       SET(_get_compilation_file FALSE)
    127       SET(_add_to_compilation TRUE)
    128       SET(_compilation_include_string)
     104    IF(_file STREQUAL "BUILD_UNIT")
     105      # Next file is the name of the build unit
     106      SET(_get_build_unit_file TRUE)
     107    ELSEIF(_file STREQUAL "END_BUILD_UNIT")
     108      IF(NOT _build_unit_file)
     109        MESSAGE(FATAL_ERROR "No name provided for build unit")
     110      ENDIF()
     111      IF(NOT DISABLE_BUILD_UNITS)
     112        IF(NOT _build_unit_include_string)
     113          MESSAGE(STATUS "Warning: Empty build unit!")
     114        ENDIF()
     115        IF(EXISTS ${_build_unit_file})
     116          FILE(READ ${_build_unit_file} _include_string_file)
     117        ENDIF()
     118        IF(NOT _build_unit_include_string STREQUAL "${_include_string_file}")
     119          FILE(WRITE ${_build_unit_file} "${_build_unit_include_string}")
     120        ENDIF()
     121        LIST(APPEND _${_target_name}_source_files ${_build_unit_file})
     122      ENDIF()
     123      SET(_add_to_build_unit FALSE)
     124    ELSEIF(_get_build_unit_file)
     125      SET(_build_unit_file ${CMAKE_BINARY_DIR}/${_file})
     126      SET(_get_build_unit_file FALSE)
     127      SET(_add_to_build_unit TRUE)
     128      SET(_build_unit_include_string)
    129129    ELSE()
    130130      # Default, add source file
     
    146146      LIST(APPEND _${_target_name}_source_files ${_file})
    147147
    148       # Handle compilations
    149       IF(_add_to_compilation AND NOT DISABLE_COMPILATIONS)
     148      # Handle build units
     149      IF(_add_to_build_unit AND NOT DISABLE_BUILD_UNITS)
    150150        IF(_file MATCHES "\\.(c|cc|cpp|cxx)$")
    151           SET(_compilation_include_string "${_compilation_include_string}#include \"${_file}\"\n")
     151          SET(_build_unit_include_string "${_build_unit_include_string}#include \"${_file}\"\n")
    152152        ENDIF()
    153153        # Don't compile these files, even if they are source files
Note: See TracChangeset for help on using the changeset viewer.