[CMake] append command
Clifford Yapp
cliffyapp at gmail.com
Sat Aug 13 14:57:23 EDT 2011
On Sat, Aug 13, 2011 at 5:14 AM, Glenn Coombs <glenn.coombs at gmail.com> wrote:
> I haven't seen any discussion yet of my 2nd alternative of getting cmake to
> automatically convert lists to space separated strings for certain variables
> like CMAKE_EXE_LINKER_FLAGS_RELEASE. If cmake did this then there would be
> less need for the concat version of set() as one could just use the existing
> list(APPEND) functionality. Is this a realistic possibility, or are there
> implementation issues with this suggestion ?
This surprised me as well - if you want to assemble a list of flags
"on the fly" (I needed to assemble lists of lists of flags - we pass a
lot of them) you have to take some care to either do the set trick
correctly or convert the list to a string at the "end" (if you can be
sure of where that is).
Do I understand correctly that the main concern is the ability to pass
args with ";' characters in these cases? Then the question becomes
whether quoting ";" characters as needed in user-specified options is
tricker than navigating the current behavior. To be honest, I can see
where trying to specify an argument with a quoted ";" character from
the command line would get a bit messy (in a "ok, how do I quote this
from this enviornment" sort of way) - how common are ";" characters as
components of variable values?
Cheers,
CY
More information about the CMake
mailing list