<!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="mid448D2CA1.6000300@gmx.net" type="cite">
<pre wrap="">Peter Kümmel wrote:
</pre>
<blockquote 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}"?
Peter
</pre>
</blockquote>
<pre wrap=""><!---->
Sorry, I mean GET_DIRECTORY_PROPERTY("EXCESSIVE_CPPFLAGS_LIST"
</pre>
</blockquote>
The 1st argument is the VAR I want to dump the results into. That's
not the problem. Assume that EXCESSIVE_CPPFLAGS_LIST contains a whole
bunch of junk separated with semicolons. Getting rid of the semicolons
is the problem.<br>
<br>
I wrote a totally separate script and proved that <br>
STRING(REPLACE ";" " " EXCESSIVE_CPPFLAGS "${EXCESSIVE_CPPFLAGS_LIST}")<br>
is supposed to work. Now, is it me or is it CMake...<br>
<br>
<br>
Cheers,<br>
Brandon Van Every<br>
<br>
</body>
</html>