BUG: Need to strip leading and trailing whitespace off the compiler 'ARG1'. This fixes bug#6141.
This commit is contained in:
parent
f860026155
commit
04c8544a1d
|
@ -14,6 +14,9 @@ MACRO(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
|
||||||
"${CMAKE_${lang}_COMPILER_ID_SRC}")
|
"${CMAKE_${lang}_COMPILER_ID_SRC}")
|
||||||
ENDIF(CMAKE_HOST_WIN32 AND NOT CMAKE_HOST_UNIX)
|
ENDIF(CMAKE_HOST_WIN32 AND NOT CMAKE_HOST_UNIX)
|
||||||
|
|
||||||
|
# Make sure the compiler arguments are clean.
|
||||||
|
STRING(STRIP "${CMAKE_${lang}_COMPILER_ARG1}" CMAKE_${lang}_COMPILER_ID_ARG1)
|
||||||
|
|
||||||
# Make sure user-specified compiler flags are used.
|
# Make sure user-specified compiler flags are used.
|
||||||
IF(CMAKE_${lang}_FLAGS)
|
IF(CMAKE_${lang}_FLAGS)
|
||||||
SET(CMAKE_${lang}_COMPILER_ID_FLAGS ${CMAKE_${lang}_FLAGS})
|
SET(CMAKE_${lang}_COMPILER_ID_FLAGS ${CMAKE_${lang}_FLAGS})
|
||||||
|
@ -30,7 +33,7 @@ MACRO(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
|
||||||
STRING(REGEX REPLACE " " ";" CMAKE_${lang}_COMPILER_ID_FLAGS_LIST "${CMAKE_${lang}_COMPILER_ID_FLAGS}")
|
STRING(REGEX REPLACE " " ";" CMAKE_${lang}_COMPILER_ID_FLAGS_LIST "${CMAKE_${lang}_COMPILER_ID_FLAGS}")
|
||||||
IF(COMMAND EXECUTE_PROCESS)
|
IF(COMMAND EXECUTE_PROCESS)
|
||||||
EXECUTE_PROCESS(
|
EXECUTE_PROCESS(
|
||||||
COMMAND ${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_COMPILER_ARG1} ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST} ${CMAKE_${lang}_COMPILER_ID_SRC}
|
COMMAND ${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_COMPILER_ID_ARG1} ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST} ${CMAKE_${lang}_COMPILER_ID_SRC}
|
||||||
WORKING_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}
|
WORKING_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}
|
||||||
OUTPUT_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
|
OUTPUT_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
|
||||||
ERROR_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
|
ERROR_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
|
||||||
|
@ -39,7 +42,7 @@ MACRO(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
|
||||||
ELSE(COMMAND EXECUTE_PROCESS)
|
ELSE(COMMAND EXECUTE_PROCESS)
|
||||||
EXEC_PROGRAM(
|
EXEC_PROGRAM(
|
||||||
${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_COMPILER_ID_DIR}
|
${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_COMPILER_ID_DIR}
|
||||||
ARGS ${CMAKE_${lang}_COMPILER_ARG1} ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST} \"${CMAKE_${lang}_COMPILER_ID_SRC}\"
|
ARGS ${CMAKE_${lang}_COMPILER_ID_ARG1} ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST} \"${CMAKE_${lang}_COMPILER_ID_SRC}\"
|
||||||
OUTPUT_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
|
OUTPUT_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
|
||||||
RETURN_VALUE CMAKE_${lang}_COMPILER_ID_RESULT
|
RETURN_VALUE CMAKE_${lang}_COMPILER_ID_RESULT
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue