<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Peter Kümmel wrote:
<blockquote cite="mid448D28D7.2050503@gmx.net" type="cite">
<pre wrap="">Brandon J. Van Every wrote:
</pre>
<blockquote type="cite">
<pre wrap="">This is driving me nuts. I have a list of compiler flags:
GET_DIRECTORY_PROPERTY(EXCESSIVE_CPPFLAGS_LIST
DIRECTORY ${Chicken_SOURCE_DIR}
DEFINITIONS
)
I want to turn this list into a string with NO SEMICOLONS. I need to
shove this into a .scm file and semicolons won't be appreciated. I keep
trying all these different FOREACH and STRING functions, and nothing
works! I always end up with semicolons. What's the answer? It's like
CMake is too smart about string handling, the double quotes " " always
have side effects. It won't let me manipulate a plain old dumb string.
This failed:
STRING(REPLACE ";" " " EXCESSIVE_CPPFLAGS "${EXCESSIVE_CPPFLAGS_LIST}")
This failed:
MACRO(TO_STRING list string)
SET(${string} "")
FOREACH(elem ${${list}})
SET(${string} "${${string}} ${elem}")
ENDFOREACH(elem)
ENDMACRO(TO_STRING)
Everything I try fails. HEEEELLLLPPPP!!!!!
Cheers,
Brandon Van Every
</pre>
</blockquote>
<pre wrap=""><!---->
Have you tried "${Chicken_SOURCE_DIR}"?
</pre>
</blockquote>
<br>
That's not the problem. I assure you I've got a list of stuff. Here's
what finally ends up being substituted into csc.scm. The part with
semicolons between the entries is from CMake script substitution. I
can't get rid of the semicolons!<br>
<br>
$ csc -cflags<br>
-DHAVE_CHICKEN_CONFIG_H
-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
-DC_NO_PIC_NO_DLL -I "E:/Program Files/Chicken/include" <br>
<br>
<br>
<br>
</body>
</html>