<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>OK, i don't realy understand why it does work but i got it
working:</p>
<pre>include(CMakePrintHelpers)
macro(bsMergeFlags flags_to_add flags)
set(flags_to_add ${flags_to_add} ${ARGN} )
cmake_print_variables(flags_to_add)
message(STATUS "bsMergeFlags ${flags_to_add}")
list(APPEND flags ${tmp})
message(STATUS "------------")
endmacro()
</pre>
<p>Now my problem is that the content of flags_to_add is correct
when i use cmake_print_variables but not when i try to use it in a
message() call.</p>
<p><br>
</p>
<p>I think i do miss some very important part when it comes to
variables - i'm now studying the hole chapter again, hopefully i
understand it then.</p>
<p><br>
</p>
<p>I hope you guys can help me.</p>
<p><br>
</p>
<p>best regards!<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 09.06.19 08:26, Steven Truppe wrote:<br>
</div>
<blockquote type="cite"
cite="mid:60a40eab-6766-cb93-360b-59951e81b5c7@gmx.at">ARGV1 gives
me the first list entry of my first arguments, but i don't
<br>
know how i can access the hole list.
<br>
<br>
<br>
best regards!
<br>
<br>
On 09.06.19 07:20, Steven Truppe wrote:
<br>
<blockquote type="cite">Do i need cmake_parse_arguments ??
<br>
<br>
On 09.06.19 07:01, Steven Truppe wrote:
<br>
<blockquote type="cite">Hi everyone,
<br>
<br>
i'm a c,c++,asm and a few other languages, but i still have
troubles
<br>
with macros and their arguments.
<br>
<br>
As a simple example i would like to have a macro that
list(APPEND the
<br>
two passed arguments), here the code i tried:
<br>
<br>
<a class="moz-txt-link-freetext" href="https://wandbox.org/permlink/WQZGty9PQaOz3422">https://wandbox.org/permlink/WQZGty9PQaOz3422</a>.
<br>
<br>
<br>
Let's forget about the list(APPEND) line, i just need an
example that
<br>
prints me out the first and the second argument and i'm not
able to get
<br>
it right. Would someone please explain to me how i can do this
right ?
<br>
I've read the book but that didn't helped me completely.
<br>
<br>
I hope someone here is so nice to me to explain to me how i
can write
<br>
the bsMergeFlags macro and explains me what i'm doing wrong
and how to
<br>
correct it.
<br>
<br>
I played around alot but can't get it right.
<br>
<br>
<br>
best regards!
<br>
<br>
<br>
</blockquote>
</blockquote>
</blockquote>
</body>
</html>