Hi Willy.<br><br>I believe the property ADDITIONAL_MAKE_CLEAN_FILES should be set on the directory which *creates* the file, not the one which contains it on disk.<br><br>Petr<br><br><div class="gmail_quote">On Tue, Jan 8, 2013 at 10:42 AM, Willy Lambert <span dir="ltr"><<a href="mailto:lambert.willy@gmail.com" target="_blank">lambert.willy@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
When I build my project I use the EXECUTABLE_OUTPUT_PATH to produce my<br>
binaries. As I also want to split the binaries between the stripped<br>
stuff and the debug stuff (so basically I have a exe and exe.debug).<br>
This is done with objcopy, so I use a custom command :<br>
<br>
set( EXEC ${EXECUTABLE_OUTPUT_PATH}/${EXEC_NAME} )<br>
set( DBG_INFO "${EXECUTABLE_OUTPUT_PATH}/${EXEC_NAME}.debug" )<br>
add_custom_command(TARGET ${EXEC_NAME}<br>
POST_BUILD<br>
COMMAND ${CMAKE_SPIE_OBJECT_COPY} --only-keep-debug<br>
${EXEC} ${DBG_INFO}<br>
COMMAND ${CMAKE_SPIE_STRIP} --strip-debug --strip-unneeded ${EXEC}<br>
COMMAND ${CMAKE_SPIE_OBJECT_COPY} --add-gnu-debuglink=${DBG_INFO} ${EXEC}<br>
)<br>
<br>
My problem comes when I use the "make clean" command from my cmake<br>
root dir, because it doesn't clean the custom command output *.debug<br>
(which is quite natural). So I tried to modify properties to specify<br>
ADDITIONAL_MAKE_CLEAN_FILES, but this :<br>
<br>
set_property(DIRECTORY ${EXECUTABLE_OUTPUT_PATH}<br>
PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${EXEC_NAME}.debug)<br>
<br>
results in :<br>
<br>
CMake Error a tXXXXXXX/cle.cmake:42 (set_property):<br>
set_property DIRECTORY scope provided but requested directory was not<br>
found. This could be because the directory argument was invalid or, it is<br>
valid but has not been processed yet.<br>
<br>
<br>
If I'm correct it's due to the EXECUTABLE_OUTPUT_PATH dir management.<br>
<br>
My questions are :<br>
_ is EXECUTABLE_OUTPUT_PATH deprecated ? I read in docs :<br>
"EXECUTABLE_OUTPUT_PATH: Old executable location variable." (so I<br>
wonder about the "Old" point)<br>
_ is my custom command correctly configured regarding the action<br>
"modifying a compiled exec" ?<br>
_ did I do something wrong with "make clean" properties ?<br>
<br>
Have a nice day !<br>
--<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 <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: <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>
</blockquote></div><br>