How to translate makefile to b2 jamfile conditional #203
-
How to translate the following makefile code to b2 jamfile conditional requirement:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
What's ABC in this case? An environment variable? |
Beta Was this translation helpful? Give feedback.
-
Yes, it's one of the possible values for |
Beta Was this translation helpful? Give feedback.
-
Returning to your original question, if you do need something like that you can go the most primitive route and add a similar construct to
With a POSIX shell this can be used as ABC=1 b2 You can also pass that value via a b2 CLI flag (or support both):
And invoke b2 like this: b2 -s ABC=1 And you can go fancier with
And invoke b2 like this: b2 --ABC # NOT ABC=1 Finally, you can do it by creating a b2 feature. In this case, a composite feature will do:
The benefit is that now you can ask for 2 builds at the same time, with ABC enabled and disabled: b2 ABC=on,off Some docs on features: https://www.boost.org/doc/libs/1_80_0/tools/build/doc/html/index.html#bbv2.extending.features |
Beta Was this translation helpful? Give feedback.
Returning to your original question, if you do need something like that you can go the most primitive route and add a similar construct to
project-config.jam
:With a POSIX shell this can be used as
You can also pass that value via a b2 CLI flag (or support both):
And invoke b2 like this:
And you can go fa…