Support multiple arguments in CC,CXX,FC values
Teach compiler identification to support values such as export CC='gcc -g -O2' by separating the arguments on spaces. We already do this for the values of CFLAGS, CXXFLAGS, and FFLAGS.
This commit is contained in:
parent
ebdda6ed13
commit
fd38eda9fe
|
@ -19,6 +19,7 @@
|
|||
FUNCTION(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
|
||||
# Make sure the compiler arguments are clean.
|
||||
STRING(STRIP "${CMAKE_${lang}_COMPILER_ARG1}" CMAKE_${lang}_COMPILER_ID_ARG1)
|
||||
STRING(REGEX REPLACE " +" ";" CMAKE_${lang}_COMPILER_ID_ARG1 "${CMAKE_${lang}_COMPILER_ID_ARG1}")
|
||||
|
||||
# Make sure user-specified compiler flags are used.
|
||||
IF(CMAKE_${lang}_FLAGS)
|
||||
|
|
Loading…
Reference in New Issue