<html>
<head>
<meta name="generator" content="Windows Mail 17.5.9600.20856">
<style data-externalstyle="true"><!--
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
}
p.MsoNormal, li.MsoNormal, div.MsoNormal {
margin:0in;
margin-bottom:.0001pt;
}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst, 
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle, 
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
line-height:115%;
}
--></style></head>
<body dir="ltr">
<div data-externalstyle="false" dir="ltr" style="font-family: 'Calibri', 'Segoe UI', 'Meiryo', 'Microsoft YaHei UI', 'Microsoft JhengHei UI', 'Malgun Gothic', 'sans-serif';font-size:12pt;"><div>I am also interested in this. Not because I couldn’t do 2 seperate build directories for CLI and IDE building, but because VS projects are still the best shot at getting parallel builds on Windows. NMake batch support is not implemented, and Ninja has never built any of my projects without errors.<br></div><div data-signatureblock="true"><br></div><div style="padding-top: 5px; border-top-color: rgb(229, 229, 229); border-top-width: 1px; border-top-style: solid;"><div><font face=" 'Calibri', 'Segoe UI', 'Meiryo', 'Microsoft YaHei UI', 'Microsoft JhengHei UI', 'Malgun Gothic', 'sans-serif'" style='line-height: 15pt; letter-spacing: 0.02em; font-family: "Calibri", "Segoe UI", "Meiryo", "Microsoft YaHei UI", "Microsoft JhengHei UI", "Malgun Gothic", "sans-serif"; font-size: 12pt;'><b>Feladó:</b> <a href="mailto:masariello+cmake.org@gmail.com" target="_parent">Alessio</a><br><b>Elküldve:</b> ‎kedd‎, ‎2015‎. ‎május‎ ‎12‎. ‎13‎:‎28<br><b>Címzett:</b> <a href="mailto:cmake@cmake.org" target="_parent">cmake@cmake.org</a></font></div></div><div><br></div><div dir=""><div dir="ltr">Hi All<div><br></div><div>(similar questions have been asked before, but none has quite hit the mark)<br><div><br></div><div>Is there any way to force MSVC to build custom targets marked with <span style="font-size: 12.8px;">EXCLUDE_FROM_DEFAULT_BUILD?</span></div><div><span style="font-size: 12.8px;"><br></span></div><div><span style="font-size: 12.8px;">Using</span></div><div><span style="font-size: 12.8px;"><br></span></div><div><span style="font-size: 12.8px;">      cmake --build . --target SOME_EXCLUDED_TARGET --config Release</span></div><div><span style="font-size: 12.8px;"><br></span></div><div><span style="font-size: 12.8px;">will produce the well known message</span></div><div><span style="font-size: 12.8px;"><br></span></div><div><span style="font-size: 12.8px;">     Project not selected to build for this solution configuration</span></div><div><span style="font-size: 12.8px;"><br></span></div><div><span style="font-size: 12.8px;">I could find the following two ways to get the targets to build, but they all have drawbacks:</span></div><div><ol style="padding-top: 0px; padding-bottom: 0px; margin-top: 0px; margin-bottom: 0px; list-style-type: decimal;"><li><span style="font-size: 12.8px;">Use a BATCH_BUILD variable that will disable the setting of </span><span style="font-size: 12.8px;">EXCLUDE_FROM_DEFAULT_BUILD on the targets.</span><br></li><li><span style="font-size: 12.8px;">Define a set of build configurations on which </span><span style="font-size: 12.8px;">EXCLUDE_FROM_DEFAULT_BUILD_<config> is not set (e.g. Release_ALL is identical to Release, except it has no build exclusions)</span><br></li></ol></div><div>Option 1 has the drawback of producing solutions that do not work well for interactive development<br></div><div><br></div><div>Option 2 is rather cumbersome and would require the users to build separate sets of binaries. I could not quite figure out a way to make the Release_ALL packaging commands reference the Release target binaries.</div><div><br></div><div>Has anyone figured out a way to get the full monty, i.e. a way to generate an MSVC solution that works well for both interactive and command line builds?</div><div><br></div><div>Thank you so much for any feedback you can provide on this</div><div>-alessio</div></div></div>
</div></div>
</body>
</html>