diff options
author | Brad King <brad.king@kitware.com> | 2010-03-15 13:00:31 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-03-15 19:17:18 (GMT) |
commit | fd38eda9fe92dea61372e3ee1b54dfa49d6bddce (patch) | |
tree | 138f9f2c7f3c92594d942b8205c892df44aebfec /Modules | |
parent | ebdda6ed138173a287e52d7877c528ec8ccc817f (diff) | |
download | CMake-fd38eda9fe92dea61372e3ee1b54dfa49d6bddce.zip CMake-fd38eda9fe92dea61372e3ee1b54dfa49d6bddce.tar.gz CMake-fd38eda9fe92dea61372e3ee1b54dfa49d6bddce.tar.bz2 |
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 bddd6a1..4a800a8 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) |