[CMake] output a string instead of a list
Brandon J. Van Every
bvanevery at gmail.com
Mon Jun 12 08:28:25 EDT 2006
Brandon J. Van Every wrote:
> Peter Kümmel wrote:
>>
>> I had recently a similar problem, until I found this solution:
>>
>> SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Zi -wd4996
>> -wd4800")
>>
>> The point was to enclose ALSO the ${CMAKE_CXX_FLAGS_DEBUG} into the
>> two quotes.
>>
>>
>> Hope this is a better hint.
>> Peter
>>
>>
>
> Bah. I finally found the problem. All of my string handling was
> correct. I was passing arguments to a CMake script using
> INCLUDE(${CMAKE_CURRENT_BINARY_DIR}/vars.cmake) because there are no
> command line arguments for scripts in CMake 2.4.2. *That* file was
> missing the quotes. Bah! Well I look forward to being able to pass
> command line arguments in the next release. This is another reason
> why they're needed: people will be forever breaking their own homebrew
> hacks around the problem. That one only cost me, oh, 2 hours at least.
>
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?
Cheers,
Brandon Van Every
More information about the CMake
mailing list