Dave, Bill? Anyone know what the difference is intended to be between EXLUDE_FROM_ALL vs EXCLUDE_FROM_DEFAULT_BUILD?<div><br></div><div>/Johan</div><div><br><br><div class="gmail_quote">On Mon, Aug 1, 2011 at 6:57 PM, Johan Björk <span dir="ltr"><<a href="mailto:phb@spotify.com">phb@spotify.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">And another update while at it.<div><br></div><div><div>The following cmake file illustrates the issue:</div><div><br>
</div><div>FILE(WRITE foo.c "")</div><div>add_library(foo EXCLUDE_FROM_ALL foo.c)</div><div>set_target_properties(foo PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)</div>
<div>FILE(WRITE foobar.c "")</div><div>add_executable(foobar foobar.c)</div><div>target_link_libraries(foobar foo)</div><div><br></div><div>This works fine in the makefile (and xcode) generator, but fails in MSVC 2008 with</div>
<div><span style="border-collapse:collapse;font-family:arial, sans-serif;font-size:13px">1>------ Skipped Build: Project: foo, Configuration: Debug Win32 ------<br>
1>Project not selected to build for this solution configuration <br>2>------ Build started: Project: foobar, Configuration: Debug Win32 ------<br>2>Compiling...<br>2>foobar.c<br>2>Compiling manifest to resources...<br>
2>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0<br>2>Copyright (C) Microsoft Corporation. All rights reserved.<br>2>Linking...<br>2>LINK : fatal error LNK1104: cannot open file 'Debug\foo.lib'<br>
2>Build log was saved at "file://c:\Users\Felix Bruns\Documents\Visual Studio 2008\Projects\a'\foobar.dir\Debug\BuildLog.htm"<br>2>foobar - 1 error(s), 0 warning(s)<br>3>------ Skipped Build: Project: ALL_BUILD, Configuration: Debug Win32 ------<br>
3>Project not selected to build for this solution configuration <br>========== Build: 0 succeeded, 1 failed, 1 up-to-date, 2 skipped ==========<br></span></div><div><span style="border-collapse:collapse;font-family:arial, sans-serif;font-size:13px"><br>
</span></div><div><span style="border-collapse:collapse;font-family:arial, sans-serif;font-size:13px">I'll file a bug.</span></div><div><div></div><div class="h5"><div><span style="border-collapse:collapse;font-family:arial, sans-serif;font-size:13px"><br>
</span></div><div><span style="border-collapse:collapse;font-family:arial, sans-serif;font-size:13px"><br></span></div><div><br></div><br><div class="gmail_quote">On Mon, Aug 1, 2011 at 5:15 PM, Johan Björk <span dir="ltr"><<a href="mailto:phb@spotify.com" target="_blank">phb@spotify.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">and I just found <span style="font-family:Verdana, Arial, Helvetica, sans-serif;font-size:11px;line-height:22px"><p>The EXCLUDE_FROM_DEFAULT_BUILD property is used by the visual studio generators. If it is set to 1 the target will not be part of the default build when you select "Build Solution".</p>
<p>Anyone know why it is different from EXLUDE_FROM_ALL ?</p><p>-Johan</p><font color="#888888"><p><br></p></font></span><div><div></div><div><div class="gmail_quote">On Mon, Aug 1, 2011 at 5:05 PM, Johan Björk <span dir="ltr"><<a href="mailto:phb@spotify.com" target="_blank">phb@spotify.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,<div><br></div><div>Anyone know anything about this? I'm seeing the same issue with MSVC 2008 + cmake 2.8(.?)</div>
<div><br></div><div>add_library(foo .. EXCLUDE_FROM_ALL ..)</div><div><br></div><font color="#888888"><div>-Johan</div></font><div><div></div><div>
<div><br></div><div><br><div class="gmail_quote">On Tue, May 3, 2011 at 4:59 PM, Andrea Galeazzi <span dir="ltr"><<a href="mailto:Galeazzi@korg.it" target="_blank">Galeazzi@korg.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I've a project made up of multiple executable target:<br>
add_executable(TARGET_NAME1 ${SOURCES1})<br>
add_executable(TARGET_NAME2 ${SOURCES2})<br>
add_executable(TARGET_NAME3 ${SOURCES3})<br>
<br>
...........<br>
Now I'd like to build just only TARGET_NAME1 when I press F7 (build solution) in visual studio. I tried to add<br>
set_target_properties(TARGET_<u></u>NAME2 PROPERTIES EXCLUDE_FROM_ALL "TRUE")<br>
set_target_properties(TARGET_<u></u>NAME3 PROPERTIES EXCLUDE_FROM_ALL "TRUE")<br>
......<br>
but it only remove the dependency from ALL_BUILD project.<br>
So, is it possible to generate a such kind of solution?<br>
______________________________<u></u>_________________<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/<u></u>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/<u></u>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/<u></u>listinfo/cmake</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div>