summaryrefslogtreecommitdiff
path: root/Modules/CMakeFindEclipseCDT4.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2009-09-17 13:08:35 -0400
committerAlexander Neundorf <neundorf@kde.org>2009-09-17 13:08:35 -0400
commit308e972412cdf3d8cde77b07527465e75888301a (patch)
tree9726700bf8feef7978d0f07fd479ccfe292c2be2 /Modules/CMakeFindEclipseCDT4.cmake
parentea282284d5d626b1143bea8d3be70995eaa88f2e (diff)
downloadcmake-308e972412cdf3d8cde77b07527465e75888301a.tar.gz
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.cmake26
1 files changed, 15 insertions, 11 deletions
diff --git a/Modules/CMakeFindEclipseCDT4.cmake b/Modules/CMakeFindEclipseCDT4.cmake
index 400e583060..3a5780d11a 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)