<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Ah, thanks, we do use EXCLUDE_FROM_ALL but I did not know about EXCLUDE_FROM_DEFAULT_BUILD. From the documentation, it sounds like we really do want to build the ALL_BUILD target, but I'm not sure how to get the ZERO_CHECK project to properly build with msbuild. I can probably use EXCLUDE_FROM_DEFAULT_BUILD as a workaround in the meantime, though.</div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 13, 2019 at 1:15 PM J. Caleb Wherry <<a href="mailto:calebwherry@gmail.com">calebwherry@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div dir="auto">I do not specify the project name when running my main build, I call msbuild like you do in #2. </div></div><div dir="auto"><br></div><div dir="auto">How do you exclude things from ‘all’? I’ve actually ran into issues with VS and how pressing “Build†in the IDE and running on the command line do different things. This comes down to 2 target properties: EXCLUDE_FROM_ALL and EXCLUDE_FROM_DEFAULT_BUILD.</div><div dir="auto"><br></div><div dir="auto">These each do different things so I ended up setting them both to true for all my tests. Give that a shot and see what happens along with the #2 way of calling msbuild.</div><div dir="auto"><br></div><div dir="auto">-Caleb</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 13, 2019 at 1:05 PM Dustyn Blasig <<a href="mailto:dustyn@blasig.us" target="_blank">dustyn@blasig.us</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi All,<div><br></div><div>I'm trying to switch from devenv to msbuild on the command line so we can use the /m parallel build option. On devenv, I just build the ALL_BUILD target and it builds properly. However, on msbuild, there are two issues.</div><div><br></div><div>1. If I specify the ALL_BUILD target on the command line directly, I get the following errors. (... used to remove large paths)</div><div><br></div><div><pre class="gmail-m_208481615547521638m_5273081225906059731gmail-console-output" style="box-sizing:border-box;white-space:pre-wrap;margin-top:0px;margin-bottom:0px;color:rgb(51,51,51);font-size:14px"><b>c:\tmp\...>msbuild c:\tmp\...\mysolution.sln /t:ALL_BUILD /p:Configuration=Release /m || goto :ERROR
</b>Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 5/10/2019 1:01:52 PM.
1>Project "c:\tmp\...\mysolution.sln" on node 1 (ALL_BUILD target(s)).
1>ValidateSolutionConfiguration:
Building solution configuration "Release|x64".
ValidateProjects:
The project "ALL_BUILD" is not selected for building in solution configuration "Release|x64".
The project "Continuous" is not selected for building in solution configuration "Release|x64".
The project "Experimental" is not selected for building in solution configuration "Release|x64".
The project "Nightly" is not selected for building in solution configuration "Release|x64".
The project "NightlyMemoryCheck" is not selected for building in solution configuration "Release|x64".
The project "RUN_TESTS" is not selected for building in solution configuration "Release|x64".</pre><pre class="gmail-m_208481615547521638m_5273081225906059731gmail-console-output" style="box-sizing:border-box;white-space:pre-wrap;margin-top:0px;margin-bottom:0px;color:rgb(51,51,51);font-size:14px"> ...
1>Project "c:\tmp\...\mysolution.sln" (1) is building "...\myproj.vcxproj.metaproj" (2) on node 1 (ALL_BUILD target(s)).
<b> 2>Project "c:\tmp\...\myproj.vcxproj.metaproj" (2) is building "c:\tmp\...\ZERO_CHECK.vcxproj" (54) on node 2 (ALL_BUILD target(s)).
</b> 54>c:\tmp\...\ZERO_CHECK.vcxproj : error MSB4057: The target "ALL_BUILD" does not exist in the project.
54>Done Building Project "c:\tmp\...\ZERO_CHECK.vcxproj" (ALL_BUILD target(s)) -- FAILED.
2>Done Building Project "c:\tmp\...\myproj.vcxproj.metaproj" (ALL_BUILD target(s)) -- FAILED.
1>Done Building Project "c:\tmp\...\mysolution.sln" (ALL_BUILD target(s)) -- FAILED.
Build FAILED.
"c:\tmp\...\mysolution.sln" (ALL_BUILD target) (1) ->
"c:\tmp\...\myproj.vcxproj.metaproj" (ALL_BUILD target) (2) ->
"c:\tmp\...\ZERO_CHECK.vcxproj" (ALL_BUILD target) (54) ->
c:\tmp\...\ZERO_CHECK.vcxproj : error MSB4057: The target "ALL_BUILD" does not exist in the project.
0 Warning(s)
1 Error(s)
</pre></div><div><br></div><div>What is different with the ALL_BUILD target between msbuild and devenv? I must be calling things improperly on the command line, but I'm not sure what.</div><div><br></div><div>2. If I instead leave ALL_BUILD off and just let it build the defaults, it gets further, but it also trys to build targets that are not enabled with the "all" target by default like our unit tests which we add through a hierarchy of targets like "run_tests_...".</div><div><br></div><div><pre class="gmail-m_208481615547521638m_5273081225906059731gmail-console-output" style="box-sizing:border-box;white-space:pre-wrap;margin-top:0px;margin-bottom:0px;color:rgb(51,51,51);font-size:14px"><b>c:\tmp\...>msbuild c:\tmp\...\mysolution.sln /p:Configuration=Release /m || goto :ERROR
</b></pre></div><div><b><br></b></div><div>Should calling msbuild on just the solution build only the "all" target by default, or does mbuild just build everything in the solution ignoring the "all" target stuff?</div><div><br></div><div>Thanks!</div></div></div></div>
-- <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/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/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/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/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/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/listinfo/cmake</a><br>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail-m_208481615547521638gmail_signature">Sent from my iPhone SE</div>
</blockquote></div>