Sorry.&nbsp; Copy-paste error kicks my ass.<br><br>&nbsp;Output expected :<br>
<br>&nbsp;
SRC_LIST : ./a.cpp;./c.cpp;./main.cpp<br>&nbsp;
src_list_in : ./a.cpp;./c.cpp;./main.cpp <br><br>Now i got the solution.<br><br>invoke the function like this : <br><br>&nbsp; AUX_SOURCE_DIRECTORY( . SRC_LIST&nbsp; )<br>&nbsp;
MESSAGE( SRC_LIST&nbsp; &quot; : ${SRC_LIST} &quot; )<br>
<br>&nbsp;
Append_headers_to_src_list( SRC_LIST&nbsp;<span style="color:rgb(204,0,0)"> &quot;${SRC_LIST}&quot;</span>&nbsp; ${CMAKE_SOURCE_DIR}/include/test&nbsp; )<br><br>Question is :<br>&nbsp;&nbsp; Why?<br><br><div class="gmail_quote">2012/5/22 Petr Kmoch <span dir="ltr">&lt;<a href="mailto:petr.kmoch@gmail.com" target="_blank">petr.kmoch@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
try as I might, I can&#39;t see a difference between the output and<br>
expected output. Perhaps a copy-paste error?<br>
<br>
Petr<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, May 22, 2012 at 3:07 AM, Marmot Ken &lt;<a href="mailto:realwangbo@gmail.com">realwangbo@gmail.com</a>&gt; wrote:<br>
&gt; here is the function :<br>
&gt;<br>
&gt; FUNCTION( Append_headers_to_src_list&nbsp; src_list_out src_list_in<br>
&gt; header_file_path_in )<br>
&gt; &nbsp;&nbsp;&nbsp; MESSAGE( src_list_in&nbsp; &quot; : ${src_list_in}&quot; )<br>
&gt; &nbsp;&nbsp;&nbsp; FILE( GLOB_RECURSE TEMP_LIST ${header_file_path_in}/*.h )<br>
&gt; &nbsp;&nbsp;&nbsp; SET( ${src_list_out} ${src_list_in} ${TEMP_LIST} PARENT_SCOPE )<br>
&gt; ENDFUNCTION( Append_headers_to_src_list<br>
&gt;<br>
&gt;<br>
&gt; here is the place where the function is invoked:<br>
&gt;<br>
&gt; AUX_SOURCE_DIRECTORY( . SRC_LIST&nbsp; )<br>
&gt; MESSAGE( SRC_LIST&nbsp; &quot; : ${SRC_LIST} &quot; )<br>
&gt;<br>
&gt; Append_headers_to_src_list( SRC_LIST&nbsp; ${SRC_LIST}<br>
&gt; ${CMAKE_SOURCE_DIR}/include/test&nbsp; )<br>
&gt;<br>
&gt; here is output¡¡£º<br>
&gt;<br>
&gt; SRC_LIST : ./a.cpp;./c.cpp;./main.cpp<br>
&gt; src_list_in : ./a.cpp<br>
&gt;<br>
&gt; Output expected :<br>
&gt;<br>
&gt; SRC_LIST : ./a.cpp;./c.cpp;./main.cpp<br>
&gt; src_list_in : ./a.cpp<br>
&gt;<br>
&gt; £Ñ£õ£å£ó£ô£é£ï£î£º<br>
&gt;¡¡&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;1&gt;&nbsp; how to get expected Output ?<br>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;2&gt;&nbsp; why ?<br>
&gt;<br>
&gt; Thanks.<br>
&gt;<br>
</div></div><span class="HOEnZb"><font color="#888888">&gt; --<br>
&gt;<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the CMake FAQ at:<br>
&gt; <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</font></span></blockquote></div><br>