[CMake] [PATCH] Support multiple arguments in CC,CXX,FC values

Michael Wild themiwi at gmail.com
Mon Mar 15 09:11:51 EDT 2010


On 15. Mar, 2010, at 14:07 , Brad King wrote:
> Anyway, this patch should fix it.  Please test.
> 
> Thanks,
> -Brad
> 
> 
> 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)
> -- 
> 1.6.6.1

Won't that fail for compiler-installations with spaces in the path (admittedly a bad idea, but on Windows probably not that unlikely)?

Michael


More information about the CMake mailing list