mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-13 04:49:45 -05:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user