GithubHelp home page GithubHelp logo

Comments (4)

grafikrobot avatar grafikrobot commented on July 18, 2024

I would prefer option 3. It's the clearest behavior. Even if it's not the most convenient.

from b2.

pdimov avatar pdimov commented on July 18, 2024

The issue is that there's no reason why all alias targets (and only alias targets) should be excepted like that.

Well because alias targets won't fail if one of their dependencies doesn't build, whereas other targets will.

from b2.

grisumbras avatar grisumbras commented on July 18, 2024

While all alias targets themselves don't fail if their sources are skipped, their dependent targets can. Consider this:

lib foo : foo.cpp : <build>no ;
alias bar : foo ;
exe baz : baz.cpp bar ;

All sources of target bar effectively become sources of target baz. But not directly, so baz won't be skipped.

That being said, option 3 is the most conservative behaviour, that creates least surprises.

from b2.

grisumbras avatar grisumbras commented on July 18, 2024

Actually, I had a thought about approach number 4:

  1. For alias targets do not skip the target due to <build>no in usage requirements.
  2. For all targets add <build>no to usage requirements if there is <build>no in either requirements or usage requirements.

As as result the problematic case from the first post will be fixed (alias target will not be skipped, so all of its non-skipped explicit sources will be built). But also non-alias downstream targets will be skipped, so problematic case from previous post is fixed too. Furthermore we'll have a nice auto-skip for tests:

lib foo : foo.cpp : [ requires cxx11_feature ] ;
run test1  : test1.cpp foo ; # skipped on C++03

from b2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.