Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 19, 2016, 1:53:36 PM (9 years ago)
Author:
muemart
Message:

Add CMake configs for Clang. Most of it is reused from GCC.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/cmake/tools/PrecompiledHeaderFiles.cmake

    r10268 r11076  
    9696    ENDFOREACH(_file)
    9797
    98   ELSEIF(CMAKE_COMPILER_IS_GNU)
     98  ELSEIF(CMAKE_COMPILER_IS_GNU OR CMAKE_COMPILER_IS_CLANG)
    9999
    100     # Append the gch-dir to make sure gcc finds the pch file
     100    # Append the gch-dir to make sure compiler finds the pch file
    101101    INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
    102102
     
    122122
    123123FUNCTION(PRECOMPILED_HEADER_FILES_POST_TARGET _target_name)
    124     # This macro is only necessary for GCC
    125     IF(CMAKE_COMPILER_IS_GNU)
     124    # This macro is only necessary for GCC and Clang
     125    IF(CMAKE_COMPILER_IS_GNU OR CMAKE_COMPILER_IS_CLANG)
    126126
    127127      SET(_pch_file "${CMAKE_CURRENT_BINARY_DIR}/${_pch_header_filename}.gch")
     
    156156      ADD_DEPENDENCIES(${_target_name} ${_target_name}PrecompiledHeader)
    157157
    158     ENDIF(CMAKE_COMPILER_IS_GNU)
     158    ENDIF(CMAKE_COMPILER_IS_GNU OR CMAKE_COMPILER_IS_CLANG)
    159159ENDFUNCTION(PRECOMPILED_HEADER_FILES_POST_TARGET)
Note: See TracChangeset for help on using the changeset viewer.