<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 02.04.2014 17:36, Luis Felipe
Dominguez Vega wrote:<br>
</div>
<blockquote
cite="mid:621573630.3933900.1396452997497.JavaMail.zimbra@estudiantes.uci.cu"
type="cite">
<div style="font-family: times new roman,new york,times,serif;
font-size: 12pt; color: #000000">
<div>Hello averyone, i am crash with my brain with this....</div>
<div>this is a little piece of my code...</div>
<div><br>
</div>
<div>set(PROG_SRC main.cpp version.cpp)</div>
<div>message(STATUS "TO CHECK: " ${PROG_SRC})</div>
</div>
</blockquote>
<br>
message(STATUS "TO CHECK: " ${PROG_SRC})<br>
is equivalent to message(STATUS "TO CHECK: " "main.cpp"
"version.cpp")<br>
message() concatenates the parameters so your message is "TO CHECK:
main.cppversion.cpp".<br>
<br>
To prevent the PROG_SRC content from being split when expanding you
can use quotes around the expansion:<br>
message(STATUS "TO CHECK: ${PROG_SRC}")<br>
<br>
<blockquote
cite="mid:621573630.3933900.1396452997497.JavaMail.zimbra@estudiantes.uci.cu"
type="cite">
<div style="font-family: times new roman,new york,times,serif;
font-size: 12pt; color: #000000"><br>
<div>I'm declared a function to check the style...</div>
<div><br>
</div>
<div>
<p style="margin: 0px;" data-mce-style="margin: 0px;">function(add_style_check_target
TARGET_NAME SOURCES_LIST)<br>
message(STATUS "TO CHECK2: " ${SOURCES_LIST})<br>
endfunction(add_style_check_target)</p>
</div>
</div>
</blockquote>
<br>
When you pass ${PROG_SRC} the expansion will split at semicolon
again so your two list item become two arguments.<br>
SOURCE_LIST only covers the first. You can either quote the
expansion again or use e.g. ${ARGN} to access a variable number of
arguments past the given list.<br>
<br>
Nils<br>
</body>
</html>