[CMake] [PATCH] Support multiple arguments in CC,CXX,FC values
Michael Wild
themiwi at gmail.com
Mon Mar 15 09:42:05 EDT 2010
On 15. Mar, 2010, at 14:37 , Brad King wrote:
> Michael Wild wrote:
>> Won't that fail for compiler-installations with spaces in the path
>> (admittedly a bad idea, but on Windows probably not that unlikely)?
>
> By the time the new code is reached we've already split the arguments
> from the compiler itself. This is done in CMakeDetermineCCompiler.cmake
> using the "PROGRAM/PROGRAM_ARGS" option of get_filename_component()
> which already accounts for spaces in the path. It uses an algorithm
> similar to what the Windows command prompt does. It works backwards
> from the end and tries using everything to the left of each space
> as a file name until something is found.
Now, that's cool. Would be even better if this option was documented ;-)
>
> What this could change is if a single argument to the compiler really
> needs a space. However this already doesn't work in the case of the
> standard CFLAGS, CXXFLAGS, and FFLAGS variables.
>
> -Brad
Sorry for the noise...
Michael
More information about the CMake
mailing list