diff options
author | Alex Neundorf <neundorf@kde.org> | 2011-04-03 18:00:35 +0200 |
---|---|---|
committer | Alex Neundorf <neundorf@kde.org> | 2011-04-03 18:00:35 +0200 |
commit | 4371147ef4549feeb88c080cf5ba99281cbb7df3 (patch) | |
tree | 8d4cda021b0fba7657a621743ea1876750e4c94d | |
parent | 4ccb44e7c5cdb1d6e9dfa9e1c62c6ee4c8597c06 (diff) | |
download | cmake-4371147ef4549feeb88c080cf5ba99281cbb7df3.tar.gz |
Fix parsing include dirs and builtin macros for CXX-only projects
Alex
-rw-r--r-- | Modules/CMakeFindEclipseCDT4.cmake | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Modules/CMakeFindEclipseCDT4.cmake b/Modules/CMakeFindEclipseCDT4.cmake index fbcdc98416..4c58f56f32 100644 --- a/Modules/CMakeFindEclipseCDT4.cmake +++ b/Modules/CMakeFindEclipseCDT4.cmake @@ -32,7 +32,13 @@ MACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _resultIncludeDirs _resultDefines SET(${_resultIncludeDirs}) SET(_gccOutput) FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy" "\n" ) - EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -v -E -x ${_lang} -dD dummy + + IF (${_lang} STREQUAL "c++") + SET(_compilerExecutable "${CMAKE_CXX_COMPILER}") + ELSE (${_lang} STREQUAL "c++") + SET(_compilerExecutable "${CMAKE_C_COMPILER}") + ENDIF (${_lang} STREQUAL "c++") + EXECUTE_PROCESS(COMMAND ${_compilerExecutable} -v -E -x ${_lang} -dD dummy WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles ERROR_VARIABLE _gccOutput OUTPUT_VARIABLE _gccStdout ) |