Boost C++ Libraries: Ticket #12037: boost::program_options tests cannot be built for both release and debug variants at the same time https://svn.boost.org/trac10/ticket/12037 <p> On Windows 7: boost::program_options tests cannot be built for both release and debug variants at the same time. </p> <p> Running b2 libs/program_options/test variant=release,debug results in: </p> <pre class="wiki">Performing configuration checks - 32-bit : yes (cached) - arm : no (cached) - mips1 : no (cached) - power : no (cached) - sparc : no (cached) - x86 : yes (cached) - symlinks supported : no (cached) - junctions supported : yes (cached) - hardlinks supported : yes (cached) error: Name clash for '&lt;p..\..\..\bin.v2\libs\program_options\test\msvc-12.0\debug\link-static\threading-multi&gt;test_convert.exe' error: error: Tried to build the target twice, with property sets having error: these incompatible properties: error: error: - &lt;define&gt;NDEBUG error: - none error: error: Please make sure to have consistent requirements for these error: properties everywhere in your project, especially for install error: targets. </pre><p> The tests can be built without problem if doing one variant after the other (two separate calls, one for release, one for debug). </p> <p> (This issue is present in the current "develop" branch, as well as in the 1.60 release) </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12037 Trac 1.4.3 Steven Watanabe Tue, 01 Mar 2016 18:14:52 GMT component changed https://svn.boost.org/trac10/ticket/12037#comment:1 https://svn.boost.org/trac10/ticket/12037#comment:1 <ul> <li><strong>component</strong> <span class="trac-field-old">program_options</span> → <span class="trac-field-new">build</span> </li> </ul> <p> This appears to because program_options sets &lt;variant&gt;debug in its project requirements. This in turn fails because the &lt;define&gt;NDEBUG which is added by &lt;variant&gt;release is not removed when replacing &lt;variant&gt;release with &lt;variant&gt;debug. </p> Ticket Diego Barrios Romero <eldruin@…> Wed, 02 Mar 2016 06:26:18 GMT <link>https://svn.boost.org/trac10/ticket/12037#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12037#comment:2</guid> <description> <p> Thanks, that is it. I can confirm that removing the line <code>&lt;variant&gt;debug</code> in the project requirements makes this work under VC12-64. Is there any reason why the debug mode is a requirement for all the tests? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Vladimir Prus</dc:creator> <pubDate>Wed, 09 Mar 2016 07:05:39 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12037#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12037#comment:3</guid> <description> <p> This is likely so that <code>assert</code> works - which is the test framework used. It might work to undefine NDEBUG instead, but it has to be tried. Do you observe any issues specifically in release builds? </p> <p> Also, for avoidance of doubt, I will not use Boost.Test. </p> </description> <category>Ticket</category> </item> </channel> </rss>