diff options
author | Alex Neundorf <neundorf@kde.org> | 2011-04-03 16:00:35 (GMT) |
---|---|---|
committer | Alex Neundorf <neundorf@kde.org> | 2011-04-03 16:00:35 (GMT) |
commit | 4371147ef4549feeb88c080cf5ba99281cbb7df3 (patch) | |
tree | 8d4cda021b0fba7657a621743ea1876750e4c94d /Modules/CMakeFindEclipseCDT4.cmake | |
parent | 4ccb44e7c5cdb1d6e9dfa9e1c62c6ee4c8597c06 (diff) | |
download | CMake-4371147ef4549feeb88c080cf5ba99281cbb7df3.zip CMake-4371147ef4549feeb88c080cf5ba99281cbb7df3.tar.gz CMake-4371147ef4549feeb88c080cf5ba99281cbb7df3.tar.bz2 |
Fix parsing include dirs and builtin macros for CXX-only projects
Alex
Diffstat (limited to 'Modules/CMakeFindEclipseCDT4.cmake')
-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 fbcdc98..4c58f56 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 ) |