From fd38eda9fe92dea61372e3ee1b54dfa49d6bddce Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 15 Mar 2010 09:00:31 -0400 Subject: 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. --- Modules/CMakeDetermineCompilerId.cmake | 1 + 1 file changed, 1 insertion(+) 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) -- cgit v0.12