Opened 7 years ago
Last modified 7 years ago
#12037 new Bugs
boost::program_options tests cannot be built for both release and debug variants at the same time
Reported by: | Owned by: | Vladimir Prus | |
---|---|---|---|
Milestone: | To Be Determined | Component: | build |
Version: | Boost Development Trunk | Severity: | Optimization |
Keywords: | Cc: |
Description
On Windows 7: boost::program_options tests cannot be built for both release and debug variants at the same time.
Running b2 libs/program_options/test variant=release,debug results in:
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 '<p..\..\..\bin.v2\libs\program_options\test\msvc-12.0\debug\link-static\threading-multi>test_convert.exe' error: error: Tried to build the target twice, with property sets having error: these incompatible properties: error: error: - <define>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.
The tests can be built without problem if doing one variant after the other (two separate calls, one for release, one for debug).
(This issue is present in the current "develop" branch, as well as in the 1.60 release)
Change History (3)
comment:1 by , 7 years ago
Component: | program_options → build |
---|
comment:2 by , 7 years ago
Thanks, that is it. I can confirm that removing the line <variant>debug
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?
comment:3 by , 7 years ago
This is likely so that assert
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?
Also, for avoidance of doubt, I will not use Boost.Test.
This appears to because program_options sets <variant>debug in its project requirements. This in turn fails because the <define>NDEBUG which is added by <variant>release is not removed when replacing <variant>release with <variant>debug.