diff options
author | Brad King <brad.king@kitware.com> | 2010-03-15 09:00:31 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-03-15 15:17:18 -0400 |
commit | fd38eda9fe92dea61372e3ee1b54dfa49d6bddce (patch) | |
tree | 138f9f2c7f3c92594d942b8205c892df44aebfec /Modules | |
parent | ebdda6ed138173a287e52d7877c528ec8ccc817f (diff) | |
download | cmake-fd38eda9fe92dea61372e3ee1b54dfa49d6bddce.tar.gz |
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.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index bddd6a1e8b..4a800a8ea0 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -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) |