<div dir="ltr"><div>Hi Andrew.</div><div><br></div><div>All that the EXCLUDE_FROM_ALL argument of add_executable() does is set that target's property EXCLUDE_FROM_ALL to TRUE. So all you need to do is set that property to false again:</div><div><br></div><div>  set_property(TARGET blah PROPERTY EXCLUDE_FROM_ALL FALSE)</div><div><br></div><div>Petr<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 4 July 2018 at 08:48, Marc CHEVRIER <span dir="ltr"><<a href="mailto:marc.chevrier@gmail.com" target="_blank">marc.chevrier@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">You can use a new target, built by all, depending on your initial target:<div><br></div><div>add_custom_target(build_blah_X ALL)</div><div>add_dependencies(build_blah_X blah_X)</div><div><br></div></div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">Le mer. 4 juil. 2018 à 03:33, Andrew White <<a href="mailto:andrew.white@audinate.com" target="_blank">andrew.white@audinate.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">How do I add an excluded (executable) target to the build.  I know that if I add a library EXCLUDE_FROM_ALL and then create a dependency on that library then that the library will be built anyway.  How do I trigger similar behaviour from an executable target?<br>
<br>
Example:<br>
<br>
Directory A contains a CMakeLists.txt that builds half a dozen utilities. As part of my project, I want to add a single target from that list.<br>
<br>
I can include the build info without auto-adding all targets by going:<br>
<br>
        Add_subdirectory(blah EXCLUDE_FROM_ALL)<br>
<br>
How do I then add target blah_X to my 'all' build?  Or is there another way to approach this?<br>
<br>
Thanks<br>
<br>
--<br>
Andrew<br>
<br>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/<wbr>CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/<wbr>listinfo/cmake</a><br>
</blockquote></div>
</div></div><br>-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/<wbr>CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/<wbr>listinfo/cmake</a><br>
<br></blockquote></div><br></div></div>