Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11076


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.

Location:
code/trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/cmake/CompilerConfig.cmake

    r8351 r11076  
    2727
    2828# Configure the compiler specific build options
    29 IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUC)
     29IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
    3030  INCLUDE(CompilerConfigGCC)
    31 ELSEIF(MSVC)
     31ELSEIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC")
    3232  INCLUDE(CompilerConfigMSVC)
     33ELSEIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
     34  INCLUDE(CompilerConfigClang)
    3335ELSE()
    3436  MESSAGE(STATUS "Warning: Your compiler is not officially supported.")
  • 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)
  • code/trunk/src/OrxonoxConfig.cmake

    r8729 r11076  
    5555    ENDIF()
    5656  ENDIF()
    57   IF(CMAKE_COMPILER_IS_GNU)
     57  IF(CMAKE_COMPILER_IS_GNU OR CMAKE_COMPILER_IS_CLANG)
    5858    INCLUDE(BuildUnitsConfigGCC.cmake)
    5959  ELSEIF(MSVC)
Note: See TracChangeset for help on using the changeset viewer.