Boost.Test, cygwin, and ISO/POSIX
Hello, I have been adding some CI infrastructure to the CMT repositories and found I am able to reproduce a failure building boost libraries that use Boost.Test for their unit tests. If you build with "cxxstd=03" you can get to some undefined functions. See: https://github.com/boostorg/test/issues/144 It looks like one needs to define _POSIX_C_SOURCE=200112L or cxxstd-dialect=gnu in order for these functions to become visible. I was thinking of addressing this two ways: 1. I want to change boost build (bjam) to define _POSIX_C_SOURCE when building on cygwin to this value if it is not otherwise defined. I can't find the right place to add this. 2. I don't think it's reasonable for Boost.Test to modify _POSIX_C_SOURCE since it could be included after sys/functional header, so I would like to either change Boost.Test so it does not depend on these three functions, or check to see if the right preprocessor definitions are set on cygwin and put up a better error message, or simply change the documentation and update all the CI build scripts in all the affected repositories to set _POSIX_C_SOURCE as part of the CI build. Any thoughts or other ideas on this? Thanks, Jim
participants (1)
-
James E. King, III