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:
Brad King 2010-03-15 09:00:31 -04:00
parent ebdda6ed13
commit fd38eda9fe
1 changed files with 1 additions and 0 deletions

View File

@ -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)