[CMake] Re: [cmake 2.5 CVS] CMAKE_${LANG}_FLAGS is initialized with
space
Rodolfo Schulz de Lima
rodolfo at rodsoft.org
Fri Dec 14 15:01:29 EST 2007
Bill Hoffman escreveu:
> OK, Dave Cole, just pointed out that list is the wrong thing to use
> here. The CMAKE_C_FLAGS variable is supposed to be a string and not a
> list. If you used list(APPEND more than once it would always fail. So,
> although odd that it has a space in it, it is benign. You should treat
> the variable as a string and not a list.
I really thought it was a list of flags. What if a flag has an argument
with a space? For instance,
-I/home/rodolfo lima
This should be treated as being one flag, not two. By treating it as one
flag, the corresponding compiler argument would be
-I/home/rodolfo\ lima
So, doing a list(APPEND CMAKE_C_FLAGS "-I/home/rodolfo lima") would do
the right thing.
Regards,
rod
More information about the CMake
mailing list