Fix parsing include dirs and builtin macros for CXX-only projects
Alex
This commit is contained in:
parent
4ccb44e7c5
commit
4371147ef4
|
@ -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 )
|
||||
|
|
Loading…
Reference in New Issue