Attn: Volodya.. Re: [config] 'requres' doesn't take differing -std into account
On Sun, Jun 21, 2015 at 8:11 PM, Edward Diener
On 6/21/2015 10:19 AM, Peter Dimov wrote:
I have, in my user-config.jam,
using gcc ;
feature.subfeature toolset gcc : std : cxx0x cxx11 cxx1y cxx14 : optional composite propagated ;
feature.compose toolset-gcc:stdcxx0x : <cxxflags>-std=c++0x ; feature.compose toolset-gcc:stdcxx11 : <cxxflags>-std=c++11 ; feature.compose toolset-gcc:stdcxx1y : <cxxflags>-std=c++1y ; feature.compose toolset-gcc:stdcxx14 : <cxxflags>-std=c++14 ;
using clang : : : <cxxflags>-Wno-variadic-macros <cxxflags>-Wno-c99-extensions ;
feature.subfeature toolset clang : std : cxx0x cxx11 cxx1y cxx14 : optional composite propagated ;
feature.compose toolset-clang:stdcxx0x : <cxxflags>-std=c++0x ; feature.compose toolset-clang:stdcxx11 : <cxxflags>-std=c++11 ; feature.compose toolset-clang:stdcxx1y : <cxxflags>-std=c++1y ; feature.compose toolset-clang:stdcxx14 : <cxxflags>-std=c++14 ;
This allows me to use toolset=clang (without -std) and toolset=clang-cxx11 (with -std=c++11).
The 'requires' rule however caches the results of the configuration check when I run with toolset=clang, and then when I rerun with toolset=clang-cxx11, it uses the cached values, which is wrong.
I believe the same problem is causing predef-check problems in the predef library because I have seen local errors using predef-check which also says that a previous calculation on another toolset has been cached and is being reused, even when the toolset changes. Somehow the incorrect cached value is being retained by Boost Build even when the toolset value changes and a new calculation needs to be made. But like many other people I don't know nearly enough about Boost Build to figure out what it is doing.
I must confess I don't know the rationale for limiting the feature set for config checks. We have to see what Volodya says about this. -- -- Rene Rivera -- Grafik - Don't Assume Anything -- Robot Dreams - http://robot-dreams.net -- rrivera/acm.org (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail
participants (1)
-
Rene Rivera