diff options
author | Alex Neundorf <neundorf@kde.org> | 2011-10-01 17:09:24 (GMT) |
---|---|---|
committer | Alex Neundorf <neundorf@kde.org> | 2011-10-01 17:09:24 (GMT) |
commit | 3df49dc7b1517109ef198177f541e24bc61fefea (patch) | |
tree | e3032764b931e41f2ab6c21cdd94bb8ed25c6dd9 /Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake | |
parent | 867b226898fa1dab1001abf7dd18e21d273b259e (diff) | |
download | CMake-3df49dc7b1517109ef198177f541e24bc61fefea.zip CMake-3df49dc7b1517109ef198177f541e24bc61fefea.tar.gz CMake-3df49dc7b1517109ef198177f541e24bc61fefea.tar.bz2 |
fix #12392: handle CMAKE_CXX_COMPILER_ARG1 for Eclipse projects
CMAKE_CXX/C_COMPILER_ARG1 have to be used for finding the include
dirs and builtin macros, so Eclipse can do code completion
Alex
Diffstat (limited to 'Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake')
-rw-r--r-- | Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake index 55c37c2..1b4532d 100644 --- a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake +++ b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake @@ -25,10 +25,12 @@ MACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _resultIncludeDirs _resultDefines IF (${_lang} STREQUAL "c++") SET(_compilerExecutable "${CMAKE_CXX_COMPILER}") + SET(_arg1 "${CMAKE_CXX_COMPILER_ARG1}") ELSE () SET(_compilerExecutable "${CMAKE_C_COMPILER}") + SET(_arg1 "${CMAKE_C_COMPILER_ARG1}") ENDIF () - EXECUTE_PROCESS(COMMAND ${_compilerExecutable} -v -E -x ${_lang} -dD dummy + EXECUTE_PROCESS(COMMAND ${_compilerExecutable} ${_arg1} -v -E -x ${_lang} -dD dummy WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles ERROR_VARIABLE _gccOutput OUTPUT_VARIABLE _gccStdout ) |