Boost Build configure checks improvement. [config/predef]

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Boost Build configure checks improvement. [config/predef]

Boost - Build mailing list
There's been a long standing "issue" with how the b2 configure checks work. Or rather how some times they don't work. In particular the issue is that the set of properties considered relevant for the configuration checks was fixed. As of last night that is now resolved <https://github.com/boostorg/build/commit/450c25c3b52f5ddcb323140f8423adf3b85b6b1a>.

As the commit mentions the set is no longer fixed and is configurable by users. The changes now mean that:

1. Any subfeatures of the top level relevant feature set are also considered as part of the set. This means that one can a configuration like below to support multiple invocations of the same toolset with different options. In particular the STD options:

=== user-config.jam ===
import feature ;
using clang ;
feature.subfeature toolset clang : std : cxx03 cxx11 cxx14 cxx17 : optional composite propagated ;
feature.compose <toolset-clang:std>cxx03 : <cxxflags>-std=c++03 ;
feature.compose <toolset-clang:std>cxx11 : <cxxflags>-std=c++11 ;
feature.compose <toolset-clang:std>cxx14 : <cxxflags>-std=c++14 ;
===

And one can then invoke "b2 toolset=clang-cxx14,clang-cxx11" and get non-colliding configuration checks.

2. The set of relevant features is now soft wired as the set of subfeatures of the "<composite>" feature. Which means ones can add to the default set <https://github.com/boostorg/build/blob/develop/src/build/configure.jam#L26>. For example to add threading choice to the relevant features:

=== user-config.jam ===
import feature ;
import configure ;
feature.compose <configure> : <threading> ;
===

Enjoy.

--
-- Rene Rivera
-- Grafik - Don't Assume Anything
-- Robot Dreams - http://robot-dreams.net
-- rrivera/acm.org (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Boost Build configure checks improvement. [config/predef]

Boost - Build mailing list
On 6/12/2017 10:29 AM, Rene Rivera via Boost-build wrote:

> There's been a long standing "issue" with how the b2 configure checks
> work. Or rather how some times they don't work. In particular the issue
> is that the set of properties considered relevant for the configuration
> checks was fixed. As of last night that is now resolved
> <https://github.com/boostorg/build/commit/450c25c3b52f5ddcb323140f8423adf3b85b6b1a>.
>
> As the commit mentions the set is no longer fixed and is configurable by
> users. The changes now mean that:
>
> 1. Any subfeatures of the top level relevant feature set are also
> considered as part of the set. This means that one can a configuration
> like below to support multiple invocations of the same toolset with
> different options. In particular the STD options:
>
> === user-config.jam ===
> import feature ;
> using clang ;
> feature.subfeature toolset clang : std : cxx03 cxx11 cxx14 cxx17 :
> optional composite propagated ;
> feature.compose <toolset-clang:std>cxx03 : <cxxflags>-std=c++03 ;
> feature.compose <toolset-clang:std>cxx11 : <cxxflags>-std=c++11 ;
> feature.compose <toolset-clang:std>cxx14 : <cxxflags>-std=c++14 ;
> ===
>
> And one can then invoke "b2 toolset=clang-cxx14,clang-cxx11" and get
> non-colliding configuration checks.
>
> 2. The set of relevant features is now soft wired as the set of
> subfeatures of the "<composite>" feature. Which means ones can add to
> the default set
> <https://github.com/boostorg/build/blob/develop/src/build/configure.jam#L26>.
> For example to add threading choice to the relevant features:
>
> === user-config.jam ===
> import feature ;
> import configure ;
> feature.compose <configure> : <threading> ;
> ===
>
> Enjoy.

Great news. Many thanks !!!

I had given up on feature.subfeature/compose, exactly because of the
problem you have fixed, in favor of my own hardcoded compiler "version"s
( which do work but which are not very flexible ). But
feature.subfeature/compose is more flexible and I will try that again.
It is really imnportant that every feature.subfeature composition get
its own separate build, and I assume that us precisely what you have fixed.

>
> --
> -- Rene Rivera
> -- Grafik - Don't Assume Anything
> -- Robot Dreams - http://robot-dreams.net <http://robot-dreams.net/>
> -- rrivera/acm.org
> <http://acm.org/> (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Boost Build configure checks improvement. [config/predef]

Boost - Build mailing list
In reply to this post by Boost - Build mailing list


On Mon, Jun 12, 2017 at 9:29 AM, Rene Rivera via Boost-build <[hidden email]> wrote:
There's been a long standing "issue" with how the b2 configure checks work. Or rather how some times they don't work. In particular the issue is that the set of properties considered relevant for the configuration checks was fixed. As of last night that is now resolved <https://github.com/boostorg/build/commit/450c25c3b52f5ddcb323140f8423adf3b85b6b1a>.

As the commit mentions the set is no longer fixed and is configurable by users. The changes now mean that:

1. Any subfeatures of the top level relevant feature set are also considered as part of the set. This means that one can a configuration like below to support multiple invocations of the same toolset with different options. In particular the STD options:

=== user-config.jam ===
import feature ;
using clang ;
feature.subfeature toolset clang : std : cxx03 cxx11 cxx14 cxx17 : optional composite propagated ;
feature.compose <toolset-clang:std>cxx03 : <cxxflags>-std=c++03 ;
feature.compose <toolset-clang:std>cxx11 : <cxxflags>-std=c++11 ;
feature.compose <toolset-clang:std>cxx14 : <cxxflags>-std=c++14 ;
===

And one can then invoke "b2 toolset=clang-cxx14,clang-cxx11" and get non-colliding configuration checks.

This sounds very cool. I'd like to start using it, but hoping for some more details. Specifically how does it work with version numbers? With the above user-config.jam could I invoke "b2 toolset=clang-3.8-cxx11,clang-3.9-cxx14"? Does this work on the msvc side as well...the version number detection seems a bit more rough there?

Or do I need to do something version specific for each version in my user-config.jam? 
=== user-config.jam ===
import feature ;
using clang : 3.8 ;
feature.subfeature toolset clang-3.8 : std : cxx03 cxx11 : optional composite propagated ;
feature.compose <toolset-clang-3.8:std>cxx03 : <cxxflags>-std=c++03 ;
feature.compose <toolset-clang-3.8:std>cxx11 : <cxxflags>-std=c++11 ;

using clang : 3.9 ;
feature.subfeature toolset clang-3.9 : std : cxx14 cxx1z : optional composite propagated ;
feature.compose <toolset-clang-3.9:std>cxx14 : <cxxflags>-std=c++14 ;
feature.compose <toolset-clang-3.9:std>cxx1z : <cxxflags>-std=c++1z ;
===
 

2. The set of relevant features is now soft wired as the set of subfeatures of the "<composite>" feature. Which means ones can add to the default set <https://github.com/boostorg/build/blob/develop/src/build/configure.jam#L26>. For example to add threading choice to the relevant features:

=== user-config.jam ===
import feature ;
import configure ;
feature.compose <configure> : <threading> ;
===

I'm not entirely clear on what this means, could you give an example of what this implies?

Thanks,
Tom 

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Loading...