diff options
author | Alexander Neundorf <neundorf@kde.org> | 2009-09-17 17:08:35 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2009-09-17 17:08:35 (GMT) |
commit | 308e972412cdf3d8cde77b07527465e75888301a (patch) | |
tree | 9726700bf8feef7978d0f07fd479ccfe292c2be2 /Modules/CMakeFindEclipseCDT4.cmake | |
parent | ea282284d5d626b1143bea8d3be70995eaa88f2e (diff) | |
download | CMake-308e972412cdf3d8cde77b07527465e75888301a.zip CMake-308e972412cdf3d8cde77b07527465e75888301a.tar.gz CMake-308e972412cdf3d8cde77b07527465e75888301a.tar.bz2 |
The check for include dirs and builtin macros also works with the Intel compiler
Alex
Diffstat (limited to 'Modules/CMakeFindEclipseCDT4.cmake')
-rw-r--r-- | Modules/CMakeFindEclipseCDT4.cmake | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/Modules/CMakeFindEclipseCDT4.cmake b/Modules/CMakeFindEclipseCDT4.cmake index 400e583..3a5780d 100644 --- a/Modules/CMakeFindEclipseCDT4.cmake +++ b/Modules/CMakeFindEclipseCDT4.cmake @@ -53,19 +53,23 @@ IF(_orig_lang) SET(ENV{LANG} C) ENDIF(_orig_lang) -# Now check for C -IF ("${CMAKE_C_COMPILER_ID}" MATCHES GNU AND NOT CMAKE_ECLIPSE_C_SYSTEM_INCLUDE_DIRS) - _DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c _dirs _defines) - SET(CMAKE_ECLIPSE_C_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "C compiler system include directories") - SET(CMAKE_ECLIPSE_C_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "C compiler system defined macros") -ENDIF ("${CMAKE_C_COMPILER_ID}" MATCHES GNU AND NOT CMAKE_ECLIPSE_C_SYSTEM_INCLUDE_DIRS) +# Now check for C, works for gcc and Intel compiler at least +IF (NOT CMAKE_ECLIPSE_C_SYSTEM_INCLUDE_DIRS) + IF ("${CMAKE_C_COMPILER_ID}" MATCHES GNU OR "${CMAKE_C_COMPILER_ID}" MATCHES Intel) + _DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c _dirs _defines) + SET(CMAKE_ECLIPSE_C_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "C compiler system include directories") + SET(CMAKE_ECLIPSE_C_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "C compiler system defined macros") + ENDIF ("${CMAKE_C_COMPILER_ID}" MATCHES GNU OR "${CMAKE_C_COMPILER_ID}" MATCHES Intel) +ENDIF (NOT CMAKE_ECLIPSE_C_SYSTEM_INCLUDE_DIRS) # And now the same for C++ -IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU AND NOT CMAKE_ECLIPSE_CXX_SYSTEM_INCLUDE_DIRS) - _DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c++ _dirs _defines) - SET(CMAKE_ECLIPSE_CXX_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "CXX compiler system include directories") - SET(CMAKE_ECLIPSE_CXX_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "CXX compiler system defined macros") -ENDIF ("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU AND NOT CMAKE_ECLIPSE_CXX_SYSTEM_INCLUDE_DIRS) +IF (NOT CMAKE_ECLIPSE_CXX_SYSTEM_INCLUDE_DIRS) + IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Intel) + _DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c++ _dirs _defines) + SET(CMAKE_ECLIPSE_CXX_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "CXX compiler system include directories") + SET(CMAKE_ECLIPSE_CXX_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "CXX compiler system defined macros") + ENDIF ("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Intel) +ENDIF (NOT CMAKE_ECLIPSE_CXX_SYSTEM_INCLUDE_DIRS) # Restore original LC_ALL, LC_MESSAGES, and LANG IF(_orig_lc_all) |