Sorry. Copy-paste error kicks my ass.<br><br> Output expected :<br>
<br>
SRC_LIST : ./a.cpp;./c.cpp;./main.cpp<br>
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> AUX_SOURCE_DIRECTORY( . SRC_LIST )<br>
MESSAGE( SRC_LIST " : ${SRC_LIST} " )<br>
<br>
Append_headers_to_src_list( SRC_LIST <span style="color:rgb(204,0,0)"> "${SRC_LIST}"</span> ${CMAKE_SOURCE_DIR}/include/test )<br><br>Question is :<br> Why?<br><br><div class="gmail_quote">2012/5/22 Petr Kmoch <span dir="ltr"><<a href="mailto:petr.kmoch@gmail.com" target="_blank">petr.kmoch@gmail.com</a>></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'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 <<a href="mailto:realwangbo@gmail.com">realwangbo@gmail.com</a>> wrote:<br>
> here is the function :<br>
><br>
> FUNCTION( Append_headers_to_src_list src_list_out src_list_in<br>
> header_file_path_in )<br>
> MESSAGE( src_list_in " : ${src_list_in}" )<br>
> FILE( GLOB_RECURSE TEMP_LIST ${header_file_path_in}/*.h )<br>
> SET( ${src_list_out} ${src_list_in} ${TEMP_LIST} PARENT_SCOPE )<br>
> ENDFUNCTION( Append_headers_to_src_list<br>
><br>
><br>
> here is the place where the function is invoked:<br>
><br>
> AUX_SOURCE_DIRECTORY( . SRC_LIST )<br>
> MESSAGE( SRC_LIST " : ${SRC_LIST} " )<br>
><br>
> Append_headers_to_src_list( SRC_LIST ${SRC_LIST}<br>
> ${CMAKE_SOURCE_DIR}/include/test )<br>
><br>
> here is output¡¡£º<br>
><br>
> SRC_LIST : ./a.cpp;./c.cpp;./main.cpp<br>
> src_list_in : ./a.cpp<br>
><br>
> Output expected :<br>
><br>
> SRC_LIST : ./a.cpp;./c.cpp;./main.cpp<br>
> src_list_in : ./a.cpp<br>
><br>
> £Ñ£õ£å£ó£ô£é£ï£î£º<br>
>¡¡ <1> how to get expected Output ?<br>
> <2> why ?<br>
><br>
> Thanks.<br>
><br>
</div></div><span class="HOEnZb"><font color="#888888">> --<br>
><br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the CMake FAQ at:<br>
> <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <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>