Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 27, 2011, 5:12:41 PM (13 years ago)
Author:
rgrieder
Message:

Disable precompiled header files for targets with a single build unit.

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

Legend:

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

    r8622 r8623  
    6060    # Use default
    6161    SET(_nr_of_units NR_OF_BUILD_UNITS)
     62  ENDIF()
     63
     64  # Disable precompiled header files for single unit targets
     65  IF(_nr_of_units EQUAL 1)
     66    SET(PCH_DISABLE_${_target_name} TRUE PARENT_SCOPE)
    6267  ENDIF()
    6368
  • code/branches/unity_build/cmake/tools/TargetUtilities.cmake

    r8622 r8623  
    209209    MARK_AS_ADVANCED(PCH_ENABLE_${_target_name_upper})
    210210
    211     IF(PCH_ENABLE_${_target_name_upper})
     211    IF(PCH_ENABLE_${_target_name_upper} AND NOT PCH_DISABLE_${_target_name})
    212212      PRECOMPILED_HEADER_FILES_PRE_TARGET(${_target_name} ${_arg_PCH_FILE} _${_target_name}_files EXCLUDE ${_arg_PCH_EXCLUDE})
    213213    ENDIF()
     
    357357
    358358  # Second part of precompiled header files
    359   IF(PCH_COMPILER_SUPPORT AND PCH_ENABLE_${_target_name_upper} AND _arg_PCH_FILE)
     359  IF(PCH_COMPILER_SUPPORT AND PCH_ENABLE_${_target_name_upper} AND _arg_PCH_FILE AND NOT PCH_DISABLE_${_target_name})
    360360    PRECOMPILED_HEADER_FILES_POST_TARGET(${_target_name} ${_arg_PCH_FILE})
    361361  ENDIF()
Note: See TracChangeset for help on using the changeset viewer.