[CMake] output a string instead of a list

Brandon J. Van Every bvanevery at gmail.com
Mon Jun 12 15:20:32 EDT 2006


William A. Hoffman wrote:
> At 08:28 AM 6/12/2006, Brandon J. Van Every wrote:
>
>   
>> You know I spoke too soon.  Once I changed that, I started getting semicolons in new places *inside of* quoted strings.  There is a general problem of semicolons, double quotes, and spaces in filenames beating each other up, as they are passed around between lists and strings and replacements are performed.  A list of defines like the following is highly problematic:
>>
>> -DHIERARCHICAL_INSTALL -DC_USE_C_DEFAULTS -DC_INSTALL_HOME="E:/Program Files/Chicken" -DC_INSTALL_BIN_HOME="E:/Program Files/Chicken/bin" -DC_INSTALL_INCLUDE_HOME="E:/Program Files/Chicken/include" -DC_INSTALL_LIB_HOME="E:/Program Files/Chicken/lib" -DHAVE_DIRECT_H -DHAVE_GCVT -DHAVE_STDINT_H -DHAVE_WINDOWS_H -DHAVE_LOADLIBRARY -DHAVE_GETPROCADDRESS -DHAVE_WINSOCK2_H -DHAVE_WS2TCPIP_H -DC_ENABLE_PTABLES -DC_STACK_GROWS_DOWNWARD=1
>>
>> I'll try to ask a specific question when I've got it back down to a specific problem again.  Until then, any general remedies?
>>     
> Don't pass so much junk on the command line.  Configure a file.  It has several
> benefits:
>   

I *am* configuring a file.  CONFIGURE_FILE doesn't offer regex 
replacement, so I have to use a CMake script to do it.  This is about 
extracting the results of ADD_DEFINITIONS, passing the results to a 
CMake script, then configuring a file.  I'd love it if CONFIGURE_FILE 
had more replacement capabilities, but when I made that post last week, 
crickets chirped. 

You will like the philosophy of the consuming tool.  csc.exe generates 
all these flags for you so that you don't have to do it on the comamand 
line.  :-)


Cheers,
Brandon Van Every

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20060612/2ac0f49b/attachment.htm


More information about the CMake mailing list