I'll need to try and see what happens with <source> in user-config. Probably nothing good, because one would expect neither <build-name> nor <tag> to be specified in such a case.
If I remove the check for ZLIB_SOURCE, and just do
alias boost_zlib : /zlib//zlib ; libraries-to-install += boost_zlib ;
unconditionally in libs/iostreams/build/Jamfile, this is what happens:
- when `using zlib : : <source>C:/Projects/zlib-1.2.11 ;` is in user-config, the default `b2 install` fails because `address-model=32,64 variant=debug,release` conflict as all try to build `libz.lib`. When address-model=32 variant=debug is given, `libz.lib` is installed in C:\Boost\lib, and the CMake configuration for boost_zlib correctly points to it.
And if I use using zlib : : <source>C:/Projects/zlib-1.2.11 <build-name>z32d : <address-model>32 <variant>debug ; using zlib : : <source>C:/Projects/zlib-1.2.11 <build-name>z64d : <address-model>64 <variant>debug ; using zlib : : <source>C:/Projects/zlib-1.2.11 <build-name>z32 : <address-model>32 <variant>release ; using zlib : : <source>C:/Projects/zlib-1.2.11 <build-name>z64 : <address-model>64 <variant>release ; instead, `b2 install --with-iostreams` works as expected. It would be more user-friendly if we somehow did automatically apply <tag> to the simple using zlib : : <source>C:/Projects/zlib-1.2.11 ; , but zlib.jam is in Boost.Build and the <tag> is in Boost Jamroot. :-/ Either way, a more correct check for whether `boost-install boost_zlib` needs to be performed is "whether /zlib//zlib is being built from source", but I'm not sure how to express this condition.