├── example
├── built_tool
│ ├── core
│ │ ├── a.td
│ │ └── core.cpp
│ ├── tblgen
│ │ ├── Jamfile.jam
│ │ └── tblgen.cpp
│ ├── Jamroot.jam
│ └── readme.txt
├── named-install-dirs
│ ├── a
│ └── x
│ │ ├── build.jam
│ │ ├── y
│ │ └── build.jam
│ │ └── z
│ │ └── build.jam
├── customization
│ ├── t2.verbatim
│ ├── t1.verbatim
│ ├── class.verbatim
│ ├── usage.verbatim
│ ├── jamroot.jam
│ └── readme.txt
├── make
│ ├── main_cpp.pro
│ ├── foo.py
│ ├── readme.txt
│ └── jamroot.jam
├── hello
│ ├── jamroot.jam
│ └── hello.cpp
├── hello_c
│ ├── jamroot.jam
│ └── hello.c
├── sanitizers
│ ├── jamroot.jam
│ └── main.cpp
├── try_compile
│ ├── foo.cpp
│ └── main.cpp
├── sass
│ ├── importing.scss
│ ├── include
│ │ └── foobar.scss
│ ├── singleton.sass
│ ├── singleton.scss
│ └── jamroot.jam
├── libraries
│ ├── jamroot.jam
│ ├── util
│ │ └── foo
│ │ │ ├── include
│ │ │ └── lib1.h
│ │ │ ├── jamfile.jam
│ │ │ └── bar.cpp
│ └── app
│ │ ├── app.cpp
│ │ └── jamfile.jam
├── pkg-config
│ ├── packages
│ │ ├── versioned.pc
│ │ ├── foobar.pc
│ │ ├── with-var.pc
│ │ ├── debugged.pc
│ │ ├── mangled-mt.pc
│ │ └── mangled.pc
│ ├── debug-packages
│ │ └── debugged.pc
│ ├── test4.cpp
│ ├── test1.cpp
│ ├── test3.cpp
│ ├── test5.cpp
│ └── test2.cpp
├── asciidoctor
│ ├── example.adoc
│ ├── jamroot.jam
│ └── example_manpage.adoc
├── site-config.jam
├── gettext
│ ├── jamroot.jam
│ ├── russian.po
│ ├── readme.txt
│ ├── main.cpp
│ └── jamfile.jam
├── qt
│ ├── qt3
│ │ ├── moccable-cpp
│ │ │ ├── jamroot.jam
│ │ │ └── main.cpp
│ │ ├── hello
│ │ │ ├── jamroot.jam
│ │ │ ├── canvas.h
│ │ │ └── main.cpp
│ │ └── uic
│ │ │ ├── jamroot.jam
│ │ │ └── main.cpp
│ ├── qt4
│ │ ├── hello
│ │ │ ├── jamroot.jam
│ │ │ ├── main.cpp
│ │ │ └── arrow.h
│ │ ├── moccable-cpp
│ │ │ ├── jamroot.jam
│ │ │ └── main.cpp
│ │ └── uic
│ │ │ ├── jamroot.jam
│ │ │ └── main.cpp
│ └── README.txt
├── generate
│ ├── a.cpp
│ ├── jamroot.jam
│ ├── README.txt
│ ├── gen.py
│ └── gen.jam
├── generator
│ ├── jamroot.jam
│ ├── foo.gci
│ └── README.txt
├── variant
│ ├── a.cpp
│ ├── libs
│ │ ├── l.cpp
│ │ └── jamfile.jam
│ ├── jamfile.jam
│ └── jamroot.jam
├── time
│ ├── hello.cpp
│ └── jamroot.jam
├── testing
│ ├── jamroot.jam
│ ├── fail.cpp
│ ├── compile-fail.cpp
│ └── success.cpp
├── pch
│ ├── source
│ │ └── hello_world.cpp
│ ├── include
│ │ └── pch.hpp
│ └── jamroot.jam
├── complex-testing
│ ├── fail.cpp
│ ├── compile-fail.cpp
│ ├── success.cpp
│ ├── post.cpp
│ └── jamroot.jam
├── pch-multi
│ ├── include
│ │ ├── pch.hpp
│ │ ├── std.hpp
│ │ └── extra
│ │ │ └── meta.hpp
│ ├── source
│ │ └── hello_world.cpp
│ └── jamroot.jam
└── contracts
│ ├── jamroot.jam
│ └── hello.cpp
├── test
├── qt4
│ ├── .gitignore
│ ├── rcc.qrc
│ ├── rcc.cpp
│ ├── qtcore.cpp
│ ├── qtcorefail.cpp
│ ├── mock.h
│ ├── qtsvg.cpp
│ ├── qtassistant.cpp
│ ├── qthelp.cpp
│ ├── qttest.cpp
│ ├── mock.cpp
│ ├── qtwebkit.cpp
│ ├── phonon.cpp
│ ├── qtxml.cpp
│ └── qtmultimedia.cpp
├── qt5
│ ├── .gitignore
│ ├── initialization.cpp
│ ├── rcc.qrc
│ ├── qtcharts.cpp
│ ├── rcc.cpp
│ ├── qtcore.cpp
│ ├── qtcorefail.cpp
│ ├── mock.h
│ ├── qtsvg.cpp
│ ├── qt3dlogic.cpp
│ ├── qtassistant.cpp
│ ├── qtquick.qml
│ ├── qttest.cpp
│ ├── qthelp.cpp
│ ├── qt3drender.cpp
│ ├── qtserialport.cpp
│ ├── qtwebkit.cpp
│ ├── qt3dcore.cpp
│ ├── qt3dinput.cpp
│ ├── qtserialbus.cpp
│ ├── mock.cpp
│ ├── qtpositioning.cpp
│ ├── qtwebsockets.cpp
│ ├── qtwebkitwidgets.cpp
│ ├── qtnfc.cpp
│ ├── qtgamepad.cpp
│ ├── qtxml.cpp
│ ├── qtwebsocket.cpp
│ ├── qtdeclarative.cpp
│ └── qtmultimedia.cpp
├── project-test4
│ ├── lib
│ │ ├── jamfile1.jam
│ │ ├── jamfile3.jam
│ │ ├── jamfile2.jam
│ │ ├── b.cpp
│ │ └── jamfile.jam
│ ├── lib2
│ │ ├── jamfile2.jam
│ │ └── jamfile.jam
│ ├── jamfile4.jam
│ ├── a.cpp
│ ├── a_gcc.cpp
│ ├── jamfile5.jam
│ ├── jamfile3.jam
│ ├── readme.txt
│ └── jamfile.jam
├── boostbook
│ ├── jamroot.jam
│ └── a.hpp
├── prebuilt
│ ├── jamroot.jam
│ ├── ext
│ │ ├── jamroot.jam
│ │ ├── debug
│ │ │ └── a.h
│ │ ├── release
│ │ │ └── a.h
│ │ ├── a.cpp
│ │ ├── jamfile2.jam
│ │ ├── jamfile.jam
│ │ └── jamfile3.jam
│ ├── jamfile.jam
│ └── hello.cpp
├── test2
│ ├── jamroot.jam
│ └── foo.cpp
├── project-test3
│ ├── a.cpp
│ ├── lib
│ │ ├── b.cpp
│ │ └── jamfile.jam
│ ├── lib2
│ │ ├── c.cpp
│ │ ├── d.cpp
│ │ ├── helper
│ │ │ ├── e.cpp
│ │ │ └── jamfile.jam
│ │ └── jamfile.jam
│ ├── lib3
│ │ ├── f.cpp
│ │ └── jamroot.jam
│ ├── readme.txt
│ └── jamfile.jam
├── rootless
│ ├── test1
│ │ └── sub_root
│ │ │ ├── a.cpp
│ │ │ └── jamfile.jam
│ ├── test2
│ │ └── sub_root
│ │ │ ├── a.cpp
│ │ │ └── jamfile.jam
│ └── test3
│ │ ├── sub
│ │ └── inner
│ │ │ ├── a.cpp
│ │ │ └── jamfile.jam
│ │ └── jamfile.jam
├── toolset-mock
│ ├── src
│ │ ├── project-config.jam
│ │ ├── verify.py
│ │ ├── strip.py
│ │ ├── Jamroot.jam
│ │ └── libtool.py
│ ├── lib.cpp
│ ├── main.cpp
│ └── Jamroot.jam
├── unit_tests.py
├── core_language.py
├── test1.py
├── example_make.py
├── qt4.py
├── example_customization.py
├── no_type.py
├── core_syntax_error_exit_status.py
├── example_libraries.py
├── bad_dirname.py
├── loop.py
├── composite.py
├── exit_status.py
├── qt5.py
├── core_action_status.py
├── property_expansion.py
├── toolset_msvc.py
├── project_sub_resolution.py
├── build_no.py
├── toolset_intel_darwin.py
├── builtin_echo.py
├── core_scanner.py
├── lang_objc.py
├── test-config-example.jam
├── boostbook.py
├── assert.py
├── test2.py
├── toolset_darwin.py
├── install_build_no.py
├── transitive_skip.py
├── ordered_properties.py
├── Jamfile.jam
├── example_qt4.py
├── toolset_clang_darwin.py
├── example_gettext.py
├── skipping.py
├── core_d12.py
├── toolset_clang_vxworks.py
├── c_file.py
├── conditionals3.py
├── feature_suppress_import_lib.py
├── unit_test.py
├── using.py
├── test.jam
├── project_root_rule.py
├── build_hooks.py
├── toolset_gcc.py
├── core_varnames.py
└── core_option_l.py
├── src
├── engine
│ ├── res.rc
│ ├── boost-no-inspect
│ ├── mem.cpp
│ ├── hcache.h
│ ├── class.h
│ ├── patchlevel.h
│ ├── headers.h
│ ├── check_clib.cpp
│ ├── hdrmacro.h
│ ├── search.h
│ ├── mod_path.cpp
│ ├── frames.cpp
│ ├── events.h
│ ├── types.h
│ └── mod_version.cpp
└── tools
│ ├── doxygen
│ ├── windows-paths-check.hpp
│ └── windows-paths-check.doxyfile
│ ├── xsltproc
│ ├── test.xml
│ ├── included.xsl
│ └── test.xsl
│ ├── types
│ ├── rsp.jam
│ ├── html.jam
│ ├── pdf.jam
│ ├── markdown.jam
│ ├── man.jam
│ ├── css.jam
│ ├── docbook.jam
│ ├── exe.jam
│ ├── preprocessed.jam
│ ├── obj.jam
│ ├── qt.jam
│ ├── asm.jam
│ ├── adoc.jam
│ └── objc.jam
│ ├── cygwin.jam
│ ├── features
│ ├── cxxflags-feature.jam
│ ├── linkflags-feature.jam
│ ├── rtti-feature.jam
│ ├── asmflags-feature.jam
│ ├── cxxabi-feature.jam
│ ├── link-feature.jam
│ ├── fflags-feature.jam
│ ├── include-feature.jam
│ ├── internal-feature.jam
│ ├── location-feature.jam
│ ├── archiveflags-feature.jam
│ ├── file-feature.jam
│ ├── version-feature.jam
│ ├── flags-feature.jam
│ ├── location-prefix-feature.jam
│ ├── allow-feature.jam
│ ├── search-feature.jam
│ ├── linemarkers-feature.jam
│ ├── toolset-feature.jam
│ ├── compileflags-feature.jam
│ ├── force-include-feature.jam
│ ├── coverage-feature.jam
│ ├── build-feature.jam
│ ├── name-feature.jam
│ ├── strip-feature.jam
│ ├── cflags-feature.jam
│ ├── library-feature.jam
│ ├── address-model-feature.jam
│ ├── objcflags-feature.jam
│ ├── define-feature.jam
│ ├── __init_features__.jam
│ ├── source-feature.jam
│ ├── conditional-feature.jam
│ └── threading-feature.jam
│ ├── qt.jam
│ ├── lex.jam
│ ├── generators
│ ├── dummy-generator.jam
│ └── __init_generators__.jam
│ ├── bison.jam
│ └── python-config.jam
├── .github
├── FUNDING.yml
└── dependabot.yml
├── doc
└── src
│ ├── recipes.adoc
│ ├── tools.adoc
│ ├── code_ref.adoc
│ ├── examples.adoc
│ ├── fragments.adoc
│ ├── howto.adoc
│ ├── b2.css
│ └── install.adoc
├── .ci
├── macos-test.sh
├── macos-build.sh
├── macos-install.sh
├── azp-linux-sanitizer-test.yml
├── b2_example.sh
├── azp-linux-extra.yml
├── azp-macos-extra.yml
├── azp-macos-test.yml
└── azp-linux-prep-container.yml
├── notes
├── relative_source_paths.txt
└── README.txt
├── .clangd
├── .gitignore
├── .editorconfig
├── bootstrap.sh
└── bootstrap.bat
/example/built_tool/core/a.td:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/example/named-install-dirs/a:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/qt4/.gitignore:
--------------------------------------------------------------------------------
1 | bin
2 |
--------------------------------------------------------------------------------
/test/qt5/.gitignore:
--------------------------------------------------------------------------------
1 | bin
2 |
--------------------------------------------------------------------------------
/example/customization/t2.verbatim:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/example/make/main_cpp.pro:
--------------------------------------------------------------------------------
1 | int main() {}
2 |
--------------------------------------------------------------------------------
/src/engine/res.rc:
--------------------------------------------------------------------------------
1 | 1 24 b2.exe.manifest
2 |
--------------------------------------------------------------------------------
/src/tools/doxygen/windows-paths-check.hpp:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: [grafikrobot]
2 |
--------------------------------------------------------------------------------
/example/hello/jamroot.jam:
--------------------------------------------------------------------------------
1 | exe hello : hello.cpp ;
2 |
--------------------------------------------------------------------------------
/example/hello_c/jamroot.jam:
--------------------------------------------------------------------------------
1 | exe hello : hello.c ;
2 |
--------------------------------------------------------------------------------
/example/sanitizers/jamroot.jam:
--------------------------------------------------------------------------------
1 | exe main : main.cpp ;
2 |
--------------------------------------------------------------------------------
/example/customization/t1.verbatim:
--------------------------------------------------------------------------------
1 | t1
2 | //###include "t2.verbatim"
--------------------------------------------------------------------------------
/example/try_compile/foo.cpp:
--------------------------------------------------------------------------------
1 |
2 |
3 | int foo()
4 | {
5 | return 0;
6 | }
--------------------------------------------------------------------------------
/example/built_tool/core/core.cpp:
--------------------------------------------------------------------------------
1 |
2 | int main()
3 | {
4 | return 0;
5 | }
6 |
--------------------------------------------------------------------------------
/example/sass/importing.scss:
--------------------------------------------------------------------------------
1 | @import "foobar";
2 |
3 | body { color: red; }
4 |
--------------------------------------------------------------------------------
/example/sass/include/foobar.scss:
--------------------------------------------------------------------------------
1 | body {
2 | border: { color: red; }
3 | }
4 |
--------------------------------------------------------------------------------
/src/tools/xsltproc/test.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/test/project-test4/lib/jamfile1.jam:
--------------------------------------------------------------------------------
1 |
2 | make b.obj : b.cpp : yfc-compile ;
3 |
--------------------------------------------------------------------------------
/example/make/foo.py:
--------------------------------------------------------------------------------
1 | import sys
2 | open(sys.argv[2], "w").write(open(sys.argv[1]).read())
3 |
--------------------------------------------------------------------------------
/src/engine/boost-no-inspect:
--------------------------------------------------------------------------------
1 | this really out of our hands, so tell inspect to ignore directory
--------------------------------------------------------------------------------
/test/project-test4/lib/jamfile3.jam:
--------------------------------------------------------------------------------
1 |
2 | make b.obj : b.cpp : yfc-compile : off ;
3 |
--------------------------------------------------------------------------------
/doc/src/recipes.adoc:
--------------------------------------------------------------------------------
1 | [[b2.recipes]]
2 | B2 System V2 recipes
3 | -----------------------------
4 |
--------------------------------------------------------------------------------
/test/project-test4/lib2/jamfile2.jam:
--------------------------------------------------------------------------------
1 |
2 | project mylib
3 | : requirements off
4 | ;
5 |
--------------------------------------------------------------------------------
/.ci/macos-test.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 | cd test
5 | ./test_all.py ${TOOLSET}
6 | cd ..
7 |
--------------------------------------------------------------------------------
/notes/relative_source_paths.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bfgroup/b2/HEAD/notes/relative_source_paths.txt
--------------------------------------------------------------------------------
/example/libraries/jamroot.jam:
--------------------------------------------------------------------------------
1 |
2 | use-project /library-example/foo : util/foo ;
3 |
4 | build-project app ;
5 |
--------------------------------------------------------------------------------
/test/boostbook/jamroot.jam:
--------------------------------------------------------------------------------
1 |
2 | boostbook docs : docs.xml autodoc ;
3 | doxygen autodoc : [ glob *.hpp ] ;
4 |
--------------------------------------------------------------------------------
/example/pkg-config/packages/versioned.pc:
--------------------------------------------------------------------------------
1 | Name: versioned
2 | Version: 4.2
3 | Description: A package with versioned API
4 |
--------------------------------------------------------------------------------
/.ci/macos-build.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 | cd src/engine
5 | ./build.sh ${TOOLSET}
6 | ./b2 -v
7 | cd ../..
8 |
--------------------------------------------------------------------------------
/example/built_tool/tblgen/Jamfile.jam:
--------------------------------------------------------------------------------
1 |
2 | project : requirements -tblgen//tblgen ;
3 |
4 | exe tblgen : tblgen.cpp ;
--------------------------------------------------------------------------------
/src/tools/doxygen/windows-paths-check.doxyfile:
--------------------------------------------------------------------------------
1 | INPUT = windows-paths-check.hpp
2 | GENERATE_HTML = NO
3 | GENERATE_LATEX = NO
4 |
--------------------------------------------------------------------------------
/test/project-test4/jamfile4.jam:
--------------------------------------------------------------------------------
1 |
2 | project test : requirements everything single ;
3 |
4 | build-project lib2 ;
5 |
--------------------------------------------------------------------------------
/test/project-test4/lib/jamfile2.jam:
--------------------------------------------------------------------------------
1 |
2 | project lib : requirements multi ;
3 |
4 | make b.obj : b.cpp : yfc-compile ;
5 |
--------------------------------------------------------------------------------
/example/pkg-config/packages/foobar.pc:
--------------------------------------------------------------------------------
1 | Name: foobar
2 | Version: 0.3
3 | Description: The bar for your foo
4 | Cflags: -DQWERTY=\"uiop\"
5 |
--------------------------------------------------------------------------------
/example/asciidoctor/example.adoc:
--------------------------------------------------------------------------------
1 | = The Dangerous and Thrilling Documentation Chronicles
2 |
3 | This journey begins on a bleary Monday morning.
4 |
--------------------------------------------------------------------------------
/test/qt5/initialization.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int main()
4 | {
5 | // dummy file to test initialization of qt
6 | return 0;
7 | }
--------------------------------------------------------------------------------
/example/customization/class.verbatim:
--------------------------------------------------------------------------------
1 | class_template
2 |
3 | class %class_name% {
4 | public:
5 | %class_name%() {}
6 | ~%class_name%() {}
7 | };
--------------------------------------------------------------------------------
/example/pkg-config/packages/with-var.pc:
--------------------------------------------------------------------------------
1 | qwerty=UIOP
2 | Name: with-var
3 | Version: 0.1
4 | Description: A package that defines a custom variable
5 |
--------------------------------------------------------------------------------
/example/try_compile/main.cpp:
--------------------------------------------------------------------------------
1 |
2 | #include
3 | using namespace std;
4 |
5 | int main()
6 | {
7 | std::cout << "Foo: " << FOO << "\n";
8 | }
--------------------------------------------------------------------------------
/test/qt4/rcc.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | rcc.cpp
4 |
5 |
6 |
--------------------------------------------------------------------------------
/test/qt5/rcc.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | rcc.cpp
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.ci/macos-install.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 | uname -a
5 | ls -laF /Applications
6 | sudo xcode-select -switch ${XCODE_APP}
7 | which clang++
8 |
--------------------------------------------------------------------------------
/example/built_tool/Jamroot.jam:
--------------------------------------------------------------------------------
1 |
2 | import feature ;
3 |
4 | feature.feature tblgen : : dependency free ;
5 |
6 | project built_tool ;
7 |
8 | build-project core ;
--------------------------------------------------------------------------------
/example/built_tool/tblgen/tblgen.cpp:
--------------------------------------------------------------------------------
1 |
2 | #include
3 |
4 | int main()
5 | {
6 | std::cout << "int foo;\n";
7 | return 0;
8 | }
9 |
10 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: "github-actions"
4 | directory: "/.github/"
5 | schedule:
6 | interval: "daily"
7 |
--------------------------------------------------------------------------------
/example/named-install-dirs/x/build.jam:
--------------------------------------------------------------------------------
1 | # this subproject showcases installed package name deduction
2 |
3 | project subx ;
4 | build-project y ;
5 | build-project z ;
6 |
--------------------------------------------------------------------------------
/example/pkg-config/packages/debugged.pc:
--------------------------------------------------------------------------------
1 | Name: debugged
2 | Version: 0.1
3 | Description: A package with separate debug version (release version)
4 | Cflags: -DVARIANT=\"RELEASE\"
5 |
--------------------------------------------------------------------------------
/example/pkg-config/packages/mangled-mt.pc:
--------------------------------------------------------------------------------
1 | Name: mangled
2 | Version: 0.1
3 | Description: A package with mangled name (multi-threaded version)
4 | Cflags: -DTHREADING=\"MULTI\"
5 |
--------------------------------------------------------------------------------
/example/pkg-config/packages/mangled.pc:
--------------------------------------------------------------------------------
1 | Name: mangled
2 | Version: 0.1
3 | Description: A package with mangled name (single-threaded version)
4 | Cflags: -DTHREADING=\"SINGLE\"
5 |
--------------------------------------------------------------------------------
/example/pkg-config/debug-packages/debugged.pc:
--------------------------------------------------------------------------------
1 | Name: debugged
2 | Version: 0.1
3 | Description: A package with separate debug version (debug version)
4 | Cflags: -DVARIANT=\"DEBUG\"
5 |
--------------------------------------------------------------------------------
/example/sanitizers/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | // tag::source[]
4 | int main()
5 | {
6 | char* c = nullptr;
7 | std::cout << "Hello sanitizers\n " << *c;
8 | }
9 | // end::source[]
10 |
--------------------------------------------------------------------------------
/example/customization/usage.verbatim:
--------------------------------------------------------------------------------
1 | usage
2 | Usage: codegen class_name
3 |
4 | This program takes a template of C++ code and replaces of all occurrences of
5 | %class_name% with the passed 'class_name' parameter.
--------------------------------------------------------------------------------
/example/site-config.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2002, 2003 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 |
--------------------------------------------------------------------------------
/test/prebuilt/jamroot.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2002, 2004 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 |
--------------------------------------------------------------------------------
/test/prebuilt/ext/jamroot.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2002, 2004 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/tools/types/rsp.jam:
--------------------------------------------------------------------------------
1 | # Copyright David Abrahams 2004. Distributed under the Boost
2 | # Software License, Version 1.0. (See accompanying
3 | # file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
4 | type RSP : rsp ;
5 |
--------------------------------------------------------------------------------
/test/test2/jamroot.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2002 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 | exe foo : foo.cpp ;
6 |
--------------------------------------------------------------------------------
/example/gettext/jamroot.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2003 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 |
6 | using gettext ;
7 |
--------------------------------------------------------------------------------
/src/tools/types/html.jam:
--------------------------------------------------------------------------------
1 | # Copyright David Abrahams 2004. Distributed under the Boost
2 | # Software License, Version 1.0. (See accompanying
3 | # file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
4 | type HTML : html ;
5 |
--------------------------------------------------------------------------------
/test/project-test3/a.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2003 Vladimir Prus
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
--------------------------------------------------------------------------------
/test/project-test4/a.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2003 Vladimir Prus
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
--------------------------------------------------------------------------------
/src/engine/mem.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright Rene Rivera 2006.
3 | Distributed under the Boost Software License, Version 1.0.
4 | (See accompanying file LICENSE.txt or copy at
5 | https://www.bfgroup.xyz/b2/LICENSE.txt)
6 | */
7 |
8 | #include "jam.h"
9 |
--------------------------------------------------------------------------------
/test/project-test3/lib/b.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2003 Vladimir Prus
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
--------------------------------------------------------------------------------
/test/project-test3/lib2/c.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2003 Vladimir Prus
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
--------------------------------------------------------------------------------
/test/project-test3/lib2/d.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2003 Vladimir Prus
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
--------------------------------------------------------------------------------
/test/project-test3/lib3/f.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2003 Vladimir Prus
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
--------------------------------------------------------------------------------
/test/project-test4/a_gcc.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2003 Vladimir Prus
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
--------------------------------------------------------------------------------
/test/project-test4/lib/b.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2003 Vladimir Prus
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
--------------------------------------------------------------------------------
/src/tools/types/pdf.jam:
--------------------------------------------------------------------------------
1 | #|
2 | Copyright 2017 Rene Rivera
3 | Distributed under the Boost Software License, Version 1.0. (See
4 | accompanying file LICENSE.txt or copy at
5 | https://www.bfgroup.xyz/b2/LICENSE.txt)
6 | |#
7 |
8 | type PDF : pdf ;
9 |
--------------------------------------------------------------------------------
/test/project-test3/lib2/helper/e.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2003 Vladimir Prus
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
--------------------------------------------------------------------------------
/example/qt/qt3/moccable-cpp/jamroot.jam:
--------------------------------------------------------------------------------
1 |
2 | using qt ;
3 | import cast ;
4 |
5 | project
6 | : default-build multi
7 | ;
8 |
9 | exe main : main.cpp [ cast _ moccable-cpp : main.cpp ]
10 | /qt//qt
11 | ;
12 |
--------------------------------------------------------------------------------
/example/sass/singleton.sass:
--------------------------------------------------------------------------------
1 | body
2 | p
3 | line-height: 1.5em
4 |
5 | span
6 | font-weight: 700
7 | a
8 | text-decoration: none
9 |
10 | &:hover
11 | text-decoration: underline
12 | font-size: (10px/3)
13 |
--------------------------------------------------------------------------------
/src/tools/types/markdown.jam:
--------------------------------------------------------------------------------
1 | # Copyright David Abrahams 2004. Distributed under the Boost
2 | # Software License, Version 1.0. (See accompanying
3 | # file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
4 | type MARKDOWN : md markdown ;
5 |
--------------------------------------------------------------------------------
/test/rootless/test1/sub_root/a.cpp:
--------------------------------------------------------------------------------
1 | // Copyright 2018 Rene Rivera
2 | // Distributed under the Boost Software License, Version 1.0.
3 | // (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | int main() {}
7 |
--------------------------------------------------------------------------------
/test/rootless/test2/sub_root/a.cpp:
--------------------------------------------------------------------------------
1 | // Copyright 2018 Rene Rivera
2 | // Distributed under the Boost Software License, Version 1.0.
3 | // (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | int main() {}
7 |
--------------------------------------------------------------------------------
/test/rootless/test3/sub/inner/a.cpp:
--------------------------------------------------------------------------------
1 | // Copyright 2018 Rene Rivera
2 | // Distributed under the Boost Software License, Version 1.0.
3 | // (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | int main() {}
7 |
--------------------------------------------------------------------------------
/test/toolset-mock/src/project-config.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Steven Watanabe
2 | #
3 | # Distributed under the Boost Software License, Version 1.0.
4 | # (See accompanying file LICENSE.txt or copy at
5 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
--------------------------------------------------------------------------------
/example/generate/a.cpp:
--------------------------------------------------------------------------------
1 |
2 | int main()
3 | {
4 | }
5 |
6 | /*
7 | Copyright 2007 Vladimir Prus
8 | Distributed under the Boost Software License, Version 1.0.
9 | (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
10 | */
11 |
--------------------------------------------------------------------------------
/test/project-test3/lib3/jamroot.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2002 Rene Rivera
2 | # Copyright 2002, 2003 Vladimir Prus
3 | # Distributed under the Boost Software License, Version 1.0.
4 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 |
--------------------------------------------------------------------------------
/test/toolset-mock/lib.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Steven Watanabe
2 | //
3 | // Distributed under the Boost Software License Version 1.0.
4 | // (See accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | int f() {}
8 |
--------------------------------------------------------------------------------
/test/toolset-mock/main.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2017 Steven Watanabe
2 | //
3 | // Distributed under the Boost Software License Version 1.0.
4 | // (See accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | int main() {}
8 |
--------------------------------------------------------------------------------
/example/sass/singleton.scss:
--------------------------------------------------------------------------------
1 | body {
2 | p { line-height: 1.5em; }
3 | span { font-weight: 700; }
4 | a {
5 | text-decoration: none;
6 | &:hover {
7 | text-decoration: underline;
8 | font-size: (10px/3);
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/tools/types/man.jam:
--------------------------------------------------------------------------------
1 | #|
2 | Copyright 2017 Rene Rivera
3 | Distributed under the Boost Software License, Version 1.0. (See
4 | accompanying file LICENSE.txt or copy at
5 | https://www.bfgroup.xyz/b2/LICENSE.txt)
6 | |#
7 |
8 | type MANPAGE : man 1M n p x ;
9 |
--------------------------------------------------------------------------------
/test/project-test4/lib/jamfile.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2002 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 |
6 | make b.obj : b.cpp : yfc-compile ;
7 |
--------------------------------------------------------------------------------
/example/built_tool/readme.txt:
--------------------------------------------------------------------------------
1 |
2 | This example shows how to build an executable and then use it
3 | for generating other targets. The 'tblgen' subdirectory builds
4 | a tool, while the 'core' subdirectory uses that tool. Refer
5 | to core/Jamfile.jam for detailed comments.
--------------------------------------------------------------------------------
/example/generator/jamroot.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2006 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 | import soap ;
6 | exe foo : foo.gci : on ;
7 |
--------------------------------------------------------------------------------
/test/project-test4/jamfile5.jam:
--------------------------------------------------------------------------------
1 |
2 | project test : requirements everything single ;
3 |
4 | make a.exe : a.obj lib//b.obj/release : yfc-link ;
5 | make b.exe : a.obj : yfc-link : MACROS ;
6 | make a.obj : a.cpp : yfc-compile ;
7 |
--------------------------------------------------------------------------------
/test/rootless/test3/jamfile.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2018 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | project root-foo : build-dir bins ;
7 |
--------------------------------------------------------------------------------
/test/test2/foo.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2003 Vladimir Prus
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | int main() { return 0; }
8 |
--------------------------------------------------------------------------------
/example/variant/a.cpp:
--------------------------------------------------------------------------------
1 | // Copyright Vladimir Prus 2004.
2 | // Distributed under the Boost Software License, Version 1.0.
3 | // (See accompanying file LICENSE.txt
4 | // or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | void l();
7 | int main() { l(); return 0; }
8 |
--------------------------------------------------------------------------------
/example/generator/foo.gci:
--------------------------------------------------------------------------------
1 |
2 | int main()
3 | {
4 | return 0;
5 | }
6 | /*
7 | Copyright 2006 Vladimir Prus
8 | Distributed under the Boost Software License, Version 1.0.
9 | (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
10 | */
11 |
--------------------------------------------------------------------------------
/example/libraries/util/foo/include/lib1.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2003 Vladimir Prus
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | void foo();
8 |
--------------------------------------------------------------------------------
/test/project-test4/lib2/jamfile.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2002 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 |
6 | project
7 | : requirements off
8 | ;
9 |
--------------------------------------------------------------------------------
/src/tools/types/css.jam:
--------------------------------------------------------------------------------
1 | #|
2 | Copyright 2017 Dmitry Arkhipov
3 | Distributed under the Boost Software License, Version 1.0. (See
4 | accompanying file LICENSE.txt or copy at
5 | https://www.bfgroup.xyz/b2/LICENSE.txt)
6 | |#
7 |
8 | import type ;
9 |
10 | type CSS : css ;
11 |
--------------------------------------------------------------------------------
/test/project-test4/jamfile3.jam:
--------------------------------------------------------------------------------
1 |
2 | make a.exe : a.obj lib//b.obj/on a_gcc.obj : yfc-link : gcc ;
3 | make a.exe : a.obj lib//b.obj/on : yfc-link : multi ;
4 | make a.obj : a.cpp : yfc-compile ;
5 | make a_gcc.obj : a_gcc.cpp : yfc-compile ;
6 |
--------------------------------------------------------------------------------
/test/project-test4/readme.txt:
--------------------------------------------------------------------------------
1 | Copyright 2002 Vladimir Prus
2 | Distributed under the Boost Software License, Version 1.0.
3 | (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
4 |
5 |
6 | This test checks for correct properties of generated and used targets.
7 |
--------------------------------------------------------------------------------
/test/toolset-mock/src/verify.py:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Steven Watanabe
2 | #
3 | # Distributed under the Boost Software License, Version 1.0.
4 | # (See accompanying file LICENSE.txt or copy at
5 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | from MockProgram import *
8 |
9 | verify()
10 |
--------------------------------------------------------------------------------
/test/toolset-mock/Jamroot.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Steven Watanabe
2 | #
3 | # Distributed under the Boost Software License, Version 1.0.
4 | # (See accompanying file LICENSE.txt or copy at
5 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | lib l1 : lib.cpp ;
8 | exe test : main.cpp l1 ;
9 |
--------------------------------------------------------------------------------
/example/variant/libs/l.cpp:
--------------------------------------------------------------------------------
1 | // Copyright Vladimir Prus 2002-2004.
2 | // Distributed under the Boost Software License, Version 1.0.
3 | // (See accompanying file LICENSE.txt
4 | // or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #ifdef _WIN32
7 | __declspec(dllexport)
8 | #endif
9 | void l() {}
10 |
--------------------------------------------------------------------------------
/test/project-test3/lib2/helper/jamfile.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2002 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 |
6 | project lib2/helper ;
7 |
8 | make e.obj : e.cpp : yfc-compile ;
9 |
10 |
--------------------------------------------------------------------------------
/example/make/readme.txt:
--------------------------------------------------------------------------------
1 | Copyright 2002, 2005 Vladimir Prus
2 | Distributed under the Boost Software License, Version 1.0.
3 | (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
4 |
5 |
6 | Example of using custom command to create one file from another, using the
7 | built-in 'make' rule.
8 |
--------------------------------------------------------------------------------
/example/libraries/app/app.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2003 Vladimir Prus
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | #include
8 |
9 | int main()
10 | {
11 | foo();
12 | }
13 |
--------------------------------------------------------------------------------
/example/libraries/util/foo/jamfile.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2005 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 |
6 | project
7 | : usage-requirements include ;
8 |
9 | lib bar : bar.cpp ;
10 |
--------------------------------------------------------------------------------
/test/prebuilt/ext/debug/a.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2003 Vladimir Prus
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | #ifdef _WIN32
8 | __declspec(dllimport)
9 | #endif
10 | void debug();
11 |
--------------------------------------------------------------------------------
/test/prebuilt/ext/release/a.h:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2003 Vladimir Prus
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | #ifdef _WIN32
8 | __declspec(dllimport)
9 | #endif
10 | void release();
11 |
--------------------------------------------------------------------------------
/example/generate/jamroot.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2007 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 | import generate ;
6 |
7 | import gen ;
8 |
9 | generate a2 : a.cpp : @gen.generate-example ;
10 |
--------------------------------------------------------------------------------
/example/libraries/util/foo/bar.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2003 Vladimir Prus
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | #ifdef _WIN32
8 | __declspec(dllexport)
9 | #endif
10 | void foo() {}
11 |
--------------------------------------------------------------------------------
/test/rootless/test1/sub_root/jamfile.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2018 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | actions foo
7 | {
8 | echo "$(>)" > "$(<)"
9 | }
10 | make a.txt : a.cpp : @foo ;
11 |
--------------------------------------------------------------------------------
/example/customization/jamroot.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2003 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 | import verbatim ;
6 |
7 | exe codegen : codegen.cpp class.verbatim usage.verbatim
8 | t1.verbatim ;
9 |
10 |
--------------------------------------------------------------------------------
/example/pkg-config/test4.cpp:
--------------------------------------------------------------------------------
1 | // Copyright 2019 Dmitry Arkhipov
2 | // Distributed under the Boost Software License, Version 1.0. (See
3 | // accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 |
7 | #if VERSIONED_API < 2
8 | # error "API is too old"
9 | #endif
10 |
11 | int main() {}
12 |
--------------------------------------------------------------------------------
/example/time/hello.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2003 Vladimir Prus
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | #include
8 |
9 | int main()
10 | {
11 | std::cout << "Hello!\n";
12 | }
13 |
--------------------------------------------------------------------------------
/src/tools/types/docbook.jam:
--------------------------------------------------------------------------------
1 | #|
2 | Copyright 2017 Rene Rivera
3 | Distributed under the Boost Software License, Version 1.0. (See
4 | accompanying file LICENSE.txt or copy at
5 | https://www.bfgroup.xyz/b2/LICENSE.txt)
6 | |#
7 |
8 | import xml ; # must import to have registered XML type
9 |
10 | type DOCBOOK : docbook : XML ;
11 |
--------------------------------------------------------------------------------
/test/rootless/test3/sub/inner/jamfile.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2018 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | actions foo
7 | {
8 | echo "$(>)" > "$(<)"
9 | }
10 |
11 | make a.txt : a.cpp : @foo ;
12 |
--------------------------------------------------------------------------------
/example/variant/libs/jamfile.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2004 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 | #[libs_jamfile
6 | #<< The library `l` just needs the sources. By default it will be a shared library.
7 | lib l : l.cpp ;
8 | #]
--------------------------------------------------------------------------------
/example/hello_c/hello.c:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2025 René Ferdinand Rivera Morell
3 | Distributed under the Boost Software License, Version 1.0.
4 | See https://www.bfgroup.xyz/b2/LICENSE.txt
5 | */
6 |
7 | // tag::source[]
8 | #include
9 |
10 | int main()
11 | {
12 | puts("Hello!\n");
13 | return 0;
14 | }
15 | // end::source[]
16 |
--------------------------------------------------------------------------------
/example/generator/README.txt:
--------------------------------------------------------------------------------
1 | # Copyright 2006 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
4 |
5 | This example shows how to declare a new generator class. It is necessary when
6 | generator's logic is more complex that just running a single tool.
7 |
--------------------------------------------------------------------------------
/notes/README.txt:
--------------------------------------------------------------------------------
1 | Copyright 2005 Vladimir Prus
2 | Distributed under the Boost Software License, Version 1.0.
3 | (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
4 |
5 |
6 | This directory contains various development notes. Some of them
7 | may eventually find the way into documentation, so are purely
8 | implementation comments.
9 |
--------------------------------------------------------------------------------
/test/project-test3/lib/jamfile.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2002, 2003 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 |
6 | use-project /lib2 : ../lib2 ;
7 |
8 | make b.obj : b.cpp : yfc-compile ;
9 | make m.exe : b.obj /lib2//c.obj : yfc-link ;
10 |
--------------------------------------------------------------------------------
/test/project-test3/readme.txt:
--------------------------------------------------------------------------------
1 | Copyright 2002 Vladimir Prus
2 | Distributed under the Boost Software License, Version 1.0.
3 | (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
4 |
5 |
6 | This test checks that we have minimally working 'make' rule and that we can use target from
7 | different project with different project roots.
8 |
--------------------------------------------------------------------------------
/test/rootless/test2/sub_root/jamfile.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2018 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | project foo ;
7 |
8 | actions foo
9 | {
10 | echo "$(>)" > "$(<)"
11 | }
12 |
13 | make a.txt : a.cpp : @foo ;
14 |
--------------------------------------------------------------------------------
/example/pkg-config/test1.cpp:
--------------------------------------------------------------------------------
1 | // Copyright 2019 Dmitry Arkhipov
2 | // Distributed under the Boost Software License, Version 1.0. (See
3 | // accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 |
7 | #include
8 |
9 | int main() {
10 | return QWERTY == std::string("uiop") ? EXIT_SUCCESS : EXIT_FAILURE ;
11 | }
12 |
--------------------------------------------------------------------------------
/example/testing/jamroot.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2014 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 | using testing ;
6 |
7 | run success.cpp : : ;
8 | run-fail fail.cpp : : ;
9 | compile success.cpp : : success-compile ;
10 | compile-fail compile-fail.cpp ;
11 |
--------------------------------------------------------------------------------
/example/hello/hello.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2003 Vladimir Prus
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | // tag::source[]
8 | #include
9 |
10 | int main()
11 | {
12 | std::cout << "Hello!\n";
13 | }
14 | // end::source[]
15 |
--------------------------------------------------------------------------------
/example/testing/fail.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014 Rene Rivera
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | #include
8 | #include
9 |
10 | int main()
11 | {
12 | std::cout << "Bye!\n";
13 | return EXIT_FAILURE;
14 | }
15 |
--------------------------------------------------------------------------------
/test/prebuilt/ext/a.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2003 Vladimir Prus
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | #ifdef _WIN32
8 | __declspec(dllexport)
9 | #endif
10 | #ifdef RELEASE
11 | void release() {}
12 | #else
13 | void debug() {}
14 | #endif
15 |
--------------------------------------------------------------------------------
/example/named-install-dirs/x/y/build.jam:
--------------------------------------------------------------------------------
1 | # this subproject doesn't have a name, so its default package name is deduced
2 | # from its parent
3 |
4 | install (docdir)/y1 : ../../a ;
5 |
6 | # Copyright 2020 Dmitry Arkhipov
7 | # Distributed under the Boost Software License, Version 1.0.
8 | # (See accompanying file LICENSE.txt or copy at
9 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
10 |
--------------------------------------------------------------------------------
/example/pch/source/hello_world.cpp:
--------------------------------------------------------------------------------
1 | /* Copyright 2006 Ilya Sokolov
2 | Copyright 2006 Vladimir Prus
3 |
4 | Distributed under the Boost Software License, Version 1.0. (See
5 | accompanying file LICENSE.txt or copy at
6 | https://www.bfgroup.xyz/b2/LICENSE.txt)
7 | */
8 |
9 | #include
10 |
11 | int main()
12 | {
13 | TestClass c(1, 2);
14 | return 0;
15 | }
16 |
--------------------------------------------------------------------------------
/test/prebuilt/jamfile.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2002, 2003 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 |
6 | project test
7 | : requirements release:RELEASE
8 | ;
9 |
10 | use-project /ext : ext ;
11 |
12 | exe hello : hello.cpp /ext//a ;
13 |
14 |
--------------------------------------------------------------------------------
/example/complex-testing/fail.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014 Rene Rivera
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | #include
8 | #include
9 |
10 | int main()
11 | {
12 | std::cout << "Bye!\n";
13 | return EXIT_FAILURE;
14 | }
15 |
--------------------------------------------------------------------------------
/example/testing/compile-fail.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014 Rene Rivera
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | #include
8 | #include
9 |
10 | int main()
11 | {
12 | std::cout << "Bye!\n";
13 | return EXIT_FAILURE
14 | }
15 |
--------------------------------------------------------------------------------
/example/testing/success.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014 Rene Rivera
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 | //
7 |
8 | #include
9 | #include
10 |
11 | int main()
12 | {
13 | std::cout << "Hi!\n";
14 | return EXIT_SUCCESS;
15 | }
16 |
--------------------------------------------------------------------------------
/test/unit_tests.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright 2002, 2003 Vladimir Prus
4 | # Distributed under the Boost Software License, Version 1.0.
5 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | import BoostBuild
8 |
9 | t = BoostBuild.Tester(pass_toolset=0)
10 | t.run_build_system(["--debug", "--build-system=test/test"])
11 | t.cleanup()
12 |
--------------------------------------------------------------------------------
/example/complex-testing/compile-fail.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014 Rene Rivera
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | #include
8 | #include
9 |
10 | int main()
11 | {
12 | std::cout << "Bye!\n";
13 | return EXIT_FAILURE
14 | }
15 |
--------------------------------------------------------------------------------
/test/prebuilt/ext/jamfile2.jam:
--------------------------------------------------------------------------------
1 | import modules ;
2 | LIBNAME = [ modules.peek : LIBNAME ] ;
3 |
4 | project ext ;
5 |
6 | lib a :
7 | : debug/$(LIBNAME:E=LIBNAME-not-defined) debug
8 | :
9 | : debug
10 | ;
11 |
12 | lib a :
13 | : release/$(LIBNAME:E=LIBNAME-not-defined) release
14 | :
15 | : release
16 | ;
17 |
18 |
--------------------------------------------------------------------------------
/example/asciidoctor/jamroot.jam:
--------------------------------------------------------------------------------
1 | #|
2 | Copyright 2017 Rene Rivera
3 | Distributed under the Boost Software License, Version 1.0. (See
4 | accompanying file LICENSE.txt or copy at
5 | https://www.bfgroup.xyz/b2/LICENSE.txt)
6 | |#
7 |
8 | html example_html : example.adoc ;
9 | manpage example_1 : example_manpage.adoc ;
10 | pdf example_pdf : example.adoc ;
11 | docbook example_docbook : example.adoc ;
12 |
--------------------------------------------------------------------------------
/example/named-install-dirs/x/z/build.jam:
--------------------------------------------------------------------------------
1 | # this subproject does have a name, so its name is used as its default package
2 | # name
3 |
4 | project subz ;
5 |
6 | install (docdir)/z1 : ../../a ;
7 |
8 | # Copyright 2020 Dmitry Arkhipov
9 | # Distributed under the Boost Software License, Version 1.0.
10 | # (See accompanying file LICENSE.txt or copy at
11 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
12 |
--------------------------------------------------------------------------------
/test/core_language.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright 2002, 2003 Vladimir Prus
4 | # Distributed under the Boost Software License, Version 1.0.
5 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | import BoostBuild
8 |
9 | t = BoostBuild.Tester(pass_toolset=0)
10 | t.set_tree("core-language")
11 | t.run_build_system(["-ftest.jam"])
12 | t.cleanup()
13 |
--------------------------------------------------------------------------------
/src/tools/types/exe.jam:
--------------------------------------------------------------------------------
1 | # Copyright David Abrahams 2004. Distributed under the Boost
2 | # Software License, Version 1.0. (See accompanying
3 | # file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 | import type ;
6 |
7 | type.register EXE ;
8 | type.set-generated-target-suffix EXE : windows : "exe" ;
9 | type.set-generated-target-suffix EXE : cygwin : "exe" ;
10 |
--------------------------------------------------------------------------------
/src/tools/types/preprocessed.jam:
--------------------------------------------------------------------------------
1 | # Copyright Steven Watanabe 2011
2 | # Distributed under the Boost Software License Version 1.0. (See
3 | # accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import type ;
7 | import cpp ; # must import to have registered C CPP types
8 |
9 | type.register PREPROCESSED_C : i : C ;
10 | type.register PREPROCESSED_CPP : ii : CPP ;
11 |
--------------------------------------------------------------------------------
/test/prebuilt/hello.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2003 Vladimir Prus
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | #include
8 |
9 | int main()
10 | {
11 | #ifdef RELEASE
12 | release();
13 | #else
14 | debug();
15 | #endif
16 | return 0;
17 | }
18 |
--------------------------------------------------------------------------------
/doc/src/tools.adoc:
--------------------------------------------------------------------------------
1 | = Extra Tools
2 |
3 | == Documentation Tools
4 |
5 | :leveloffset: +2
6 | include::../../src/tools/asciidoctor.jam[tag=doc]
7 | :leveloffset: -2
8 |
9 |
10 | == Miscellaneous Tools
11 |
12 | :leveloffset: +2
13 | include::../../src/tools/pkg-config.jam[tag=doc]
14 | :leveloffset: -2
15 |
16 |
17 | :leveloffset: +2
18 | include::../../src/tools/sass.jam[tag=doc]
19 | :leveloffset: -2
20 |
--------------------------------------------------------------------------------
/example/pkg-config/test3.cpp:
--------------------------------------------------------------------------------
1 | // Copyright 2019 Dmitry Arkhipov
2 | // Distributed under the Boost Software License, Version 1.0. (See
3 | // accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 |
7 | #include
8 | #include
9 |
10 | int main(int, char const** argv) {
11 | return VARIANT == std::string(argv[1]) ? EXIT_SUCCESS : EXIT_FAILURE;
12 | }
13 |
--------------------------------------------------------------------------------
/example/pkg-config/test5.cpp:
--------------------------------------------------------------------------------
1 | // Copyright 2019 Dmitry Arkhipov
2 | // Distributed under the Boost Software License, Version 1.0. (See
3 | // accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 |
7 | #include
8 | #include
9 |
10 | int main(int, char const** argv) {
11 | return QWERTY == std::string("UIOP") ? EXIT_SUCCESS : EXIT_FAILURE;
12 | }
13 |
--------------------------------------------------------------------------------
/src/tools/types/obj.jam:
--------------------------------------------------------------------------------
1 | # Copyright David Abrahams 2004. Distributed under the Boost
2 | # Software License, Version 1.0. (See accompanying
3 | # file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 | import type ;
6 |
7 | type.register OBJ : o obj ;
8 | type.set-generated-target-suffix OBJ : windows : obj ;
9 | type.set-generated-target-suffix OBJ : cygwin : obj ;
10 |
--------------------------------------------------------------------------------
/example/complex-testing/success.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014 Rene Rivera
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | #include
8 | #include
9 |
10 | int main(int argc, char *argv[])
11 | {
12 | std::cout << "Hi!\n";
13 | return EXIT_SUCCESS;
14 | }
15 |
--------------------------------------------------------------------------------
/example/pkg-config/test2.cpp:
--------------------------------------------------------------------------------
1 | // Copyright 2019 Dmitry Arkhipov
2 | // Distributed under the Boost Software License, Version 1.0. (See
3 | // accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 |
7 | #include
8 | #include
9 |
10 | int main(int, char const** argv) {
11 | return THREADING == std::string(argv[1]) ? EXIT_SUCCESS : EXIT_FAILURE;
12 | }
13 |
--------------------------------------------------------------------------------
/example/complex-testing/post.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2014 Rene Rivera
2 | //
3 | // Distributed under the Boost Software License, Version 1.0. (See
4 | // accompanying file LICENSE.txt or copy at
5 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | #include
8 | #include
9 |
10 | int main(int argc, char *argv[])
11 | {
12 | std::cout << argv[1] << "\n";
13 | return EXIT_SUCCESS;
14 | }
15 |
--------------------------------------------------------------------------------
/test/project-test3/lib2/jamfile.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2002, 2003 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 |
6 | project lib2 ;
7 | use-project /lib2/helper : helper ;
8 |
9 | make c.obj : c.cpp : yfc-compile ;
10 | make d.obj : d.cpp : yfc-compile ;
11 | make l.exe : c.obj ..//a.obj : yfc-link ;
12 |
--------------------------------------------------------------------------------
/test/toolset-mock/src/strip.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | #
3 | # Copyright 2017 Steven Watanabe
4 | #
5 | # Distributed under the Boost Software License, Version 1.0.
6 | # (See accompanying file LICENSE.txt or copy at
7 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
8 |
9 | from MockProgram import *
10 |
11 | command('strip', '-S', '-x', input_file('bin/darwin-4.2.1/release/target-os-darwin/test'))
12 |
13 | main()
14 |
--------------------------------------------------------------------------------
/.clangd:
--------------------------------------------------------------------------------
1 | CompileFlags:
2 | CompilationDatabase: .build
3 | Diagnostics:
4 | ClangTidy:
5 | Add:
6 | - modernize-*
7 | - bugprone-*
8 | - performance-*
9 | Remove:
10 | - modernize-use-trailing-return-type
11 | MissingIncludes: Strict
12 | InlayHints:
13 | BlockEnd: Yes
14 | Designators: Yes
15 | Enabled: Yes
16 | ParameterNames: No
17 | DeducedTypes: No
18 | TypeNameLimit: 24
19 |
--------------------------------------------------------------------------------
/example/pch/include/pch.hpp:
--------------------------------------------------------------------------------
1 | /* Copyright 2006 Vladimir Prus
2 |
3 | Distributed under the Boost Software License, Version 1.0. (See
4 | accompanying file LICENSE_1_0.txt or copy at
5 | http://www.boost.org/LICENSE_1_0.txt)
6 | */
7 |
8 | #ifdef BOOST_BUILD_PCH_ENABLED
9 |
10 | #ifdef FOO2
11 | int bar();
12 | #endif
13 |
14 | class TestClass {
15 | public:
16 | TestClass(int, int) {}
17 | };
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/src/tools/xsltproc/included.xsl:
--------------------------------------------------------------------------------
1 |
2 |
9 |
11 |
12 |
--------------------------------------------------------------------------------
/example/pch-multi/include/pch.hpp:
--------------------------------------------------------------------------------
1 | /* Copyright 2006 Vladimir Prus
2 |
3 | Distributed under the Boost Software License, Version 1.0. (See
4 | accompanying file LICENSE_1_0.txt or copy at
5 | http://www.boost.org/LICENSE_1_0.txt)
6 | */
7 |
8 | #ifdef BOOST_BUILD_PCH_ENABLED
9 |
10 | #ifdef FOO2
11 | int bar();
12 | #endif
13 |
14 | class TestClass {
15 | public:
16 | TestClass(int, int) {}
17 | };
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/example/qt/qt3/hello/jamroot.jam:
--------------------------------------------------------------------------------
1 | # Copyright Vladimir Prus 2004.
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt
4 | # or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | using qt ;
7 |
8 | project
9 | # built MT version, unless asked otherwise.
10 | : default-build multi
11 | ;
12 |
13 | exe canvas : main.cpp canvas.cpp canvas.h : /qt//qt ;
--------------------------------------------------------------------------------
/example/libraries/app/jamfile.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2002, 2003, 2005 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 |
6 | # Declare a executable file, which uses a library. Note that
7 | # includes that for library will be automatically used
8 | # when compiling 'app.cpp'
9 | exe app : app.cpp /library-example/foo//bar ;
10 |
--------------------------------------------------------------------------------
/example/pch-multi/include/std.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright Rene Rivera 2019
3 |
4 | Distributed under the Boost Software License, Version 1.0. (See
5 | accompanying file LICENSE_1_0.txt or copy at
6 | http://www.boost.org/LICENSE_1_0.txt)
7 | */
8 |
9 | #ifndef B2_EXAMPLE_PCH_MULTI_STD_HPP
10 | #define B2_EXAMPLE_PCH_MULTI_STD_HPP
11 |
12 | #include
13 | #include
14 | #include
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/example/qt/qt4/hello/jamroot.jam:
--------------------------------------------------------------------------------
1 |
2 | import qt4 ;
3 |
4 | if ! [ qt4.initialized ]
5 | {
6 | ECHO "Warning: Qt4 not initialized in user-config.jam" ;
7 | ECHO "Assuming /space/p2/ghost/build/Qt4 as location." ;
8 | ECHO "This is very likely won't work for you. " ;
9 | using qt4 : /space/p2/ghost/build/Qt4 ;
10 | }
11 |
12 | project : requirements multi ;
13 |
14 | exe arrow : main.cpp arrow.cpp arrow.h /qt//QtGui ;
--------------------------------------------------------------------------------
/example/pch-multi/source/hello_world.cpp:
--------------------------------------------------------------------------------
1 | /* Copyright 2006 Ilya Sokolov
2 | Copyright 2006 Vladimir Prus
3 |
4 | Distributed under the Boost Software License, Version 1.0. (See
5 | accompanying file LICENSE.txt or copy at
6 | https://www.bfgroup.xyz/b2/LICENSE.txt)
7 | */
8 |
9 | #include
10 | #include
11 | #include
12 |
13 | int main()
14 | {
15 | TestClass c(1, 2);
16 | return 0;
17 | }
18 |
--------------------------------------------------------------------------------
/test/prebuilt/ext/jamfile.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2002 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 |
6 | project ext
7 | : requirements release:RELEASE
8 | ;
9 |
10 | lib a : a.cpp ;
11 |
12 | install dist : a : release:release
13 | debug:debug ;
14 |
--------------------------------------------------------------------------------
/src/engine/hcache.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is not part of Jam
3 | */
4 |
5 | /*
6 | * hcache.h - handle #includes in source files
7 | */
8 | #ifndef HCACHE_H
9 | #define HCACHE_H
10 |
11 | #include "config.h"
12 | #include "lists.h"
13 | #include "regexp.h"
14 | #include "rules.h"
15 |
16 | void hcache_init( void );
17 | void hcache_done( void );
18 | LIST * hcache( TARGET * t, int rec, b2::regex::program re[], LIST * hdrscan );
19 |
20 | #endif
21 |
--------------------------------------------------------------------------------
/src/tools/cygwin.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2004 Vladimir Prus.
2 | # Copyright 2016 Steven Watanabe
3 | # Copyright 2017 Peter Dimov
4 | # Distributed under the Boost Software License, Version 1.0.
5 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | # Provides utility functions for handling cygwin paths
8 |
9 | rule cygwin-to-windows-path ( path )
10 | {
11 | return [ MATCH "(.*)[\n]+" : [ SHELL "cygpath -w $(path)" ] ] ;
12 | }
13 |
--------------------------------------------------------------------------------
/src/tools/types/qt.jam:
--------------------------------------------------------------------------------
1 | # Copyright Vladimir Prus 2005. Distributed under the Boost
2 | # Software License, Version 1.0. (See accompanying
3 | # file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 | import cpp ; # must import to have registered H type
6 |
7 | type UI : ui ;
8 | type QRC : qrc ;
9 | type MOCCABLE_CPP ;
10 | type MOCCABLE_H ;
11 | type MOCCABLE5_CPP ;
12 | type MOCCABLE5_H ;
13 | # Result of running moc.
14 | type MOC : moc : H ;
15 |
--------------------------------------------------------------------------------
/src/tools/xsltproc/test.xsl:
--------------------------------------------------------------------------------
1 |
2 |
9 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/example/qt/qt3/uic/jamroot.jam:
--------------------------------------------------------------------------------
1 | # Copyright Felix E. Klee, 2003
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt
4 | # or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | # Tell that QT should be used. QTDIR will give installation
7 | # prefix.
8 | using qt ;
9 |
10 | project
11 | : default-build multi
12 | ;
13 |
14 | exe hello : main.cpp hello_world_widget.ui : /qt//qt ;
15 |
16 |
--------------------------------------------------------------------------------
/test/boostbook/a.hpp:
--------------------------------------------------------------------------------
1 | /* Copyright 2004, 2006 Vladimir Prus */
2 | /* Distributed under the Boost Software License, Version 1.0. */
3 | /* (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) */
4 |
5 |
6 | // Seems like Boostbook does like classes outside of namespaces,
7 | // and won't generate anything for them.
8 | namespace boost {
9 |
10 | /// A class
11 | class A {
12 | public:
13 | /// A constructor
14 | A();
15 | };
16 | }
17 |
--------------------------------------------------------------------------------
/example/contracts/jamroot.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2008 Jurko Gospodnetic
2 | # Copyright 2025 René Ferdinand Rivera Morell
3 | # Distributed under the Boost Software License, Version 1.0.
4 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | project
7 | : requirements
8 | on
9 | enforce
10 | clang:libc++
11 | 23
12 | ;
13 |
14 | exe hello : hello.cpp ;
15 |
--------------------------------------------------------------------------------
/src/engine/class.h:
--------------------------------------------------------------------------------
1 | /* Copyright Vladimir Prus 2003. Distributed under the Boost */
2 | /* Software License, Version 1.0. (See accompanying */
3 | /* file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) */
4 |
5 | #ifndef CLASS_H_VP_2003_08_01
6 | #define CLASS_H_VP_2003_08_01
7 |
8 | #include "config.h"
9 | #include "lists.h"
10 | #include "frames.h"
11 |
12 | OBJECT * make_class_module( LIST * xname, LIST * bases );
13 | void class_done( void );
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/src/tools/features/cxxflags-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.cxxflags]]`cxxflags`::
11 | See <`>>.
12 |
13 | |# # end::doc[]
14 |
15 | feature.feature cxxflags
16 | :
17 | : free optional ;
18 |
--------------------------------------------------------------------------------
/example/pch-multi/include/extra/meta.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright Rene Rivera 2019
3 |
4 | Distributed under the Boost Software License, Version 1.0. (See
5 | accompanying file LICENSE_1_0.txt or copy at
6 | http://www.boost.org/LICENSE_1_0.txt)
7 | */
8 |
9 | #ifndef B2_EXAMPLE_PCH_MULTI_EXTRA_META_HPP
10 | #define B2_EXAMPLE_PCH_MULTI_EXTRA_META_HPP
11 |
12 | #include
13 | #include
14 | #include
15 | #include
16 |
17 | #endif
18 |
--------------------------------------------------------------------------------
/src/tools/features/linkflags-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.linkflags]]`linkflags`::
11 | See <`>>.
12 |
13 | |# # end::doc[]
14 |
15 | feature.feature linkflags
16 | :
17 | : free optional ;
18 |
--------------------------------------------------------------------------------
/test/project-test3/jamfile.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2002, 2003 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 |
6 | use-project /lib2 : lib2 ;
7 | use-project /lib3 : lib3 ;
8 |
9 | make a.exe : a.obj lib//b.obj /lib2//c.obj lib2//d.obj lib2/helper//e.obj /lib3//f.obj : yfc-link ;
10 | make a.obj : a.cpp : yfc-compile ;
11 |
12 | build-project lib2 ;
13 | build-project lib ;
14 |
--------------------------------------------------------------------------------
/test/test1.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright 2002 Vladimir Prus
4 | # Distributed under the Boost Software License, Version 1.0.
5 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | import BoostBuild
8 |
9 | t = BoostBuild.Tester(pass_toolset=0)
10 |
11 | t.write("test.jam", """
12 | actions unbuilt { }
13 | unbuilt all ;
14 | ECHO "Hi" ;
15 | """)
16 |
17 | t.run_build_system(["-ftest.jam", "-d0"], stdout="Hi\n")
18 | t.cleanup()
19 |
--------------------------------------------------------------------------------
/example/time/jamroot.jam:
--------------------------------------------------------------------------------
1 | #|
2 | Distributed under the Boost Software License, Version 1.0. (See
3 | accompanying file LICENSE.txt or copy at
4 | https://www.bfgroup.xyz/b2/LICENSE.txt)
5 | |#
6 |
7 | #[jamroot
8 | #<< Import the time rule from the testing module.
9 | import testing ;
10 |
11 | #<< The target we are timing just builds a hello program.
12 | exe hello : hello.cpp ;
13 |
14 | #<< This target records the time to build the `hello` target.
15 | time hello.time : hello ;
16 | #]
17 |
--------------------------------------------------------------------------------
/test/project-test4/jamfile.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2003 Dave Abrahams
2 | # Copyright 2002, 2003 Vladimir Prus
3 | # Distributed under the Boost Software License, Version 1.0.
4 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 |
7 | project test : requirements everything single ;
8 |
9 | make a.exe : a.obj lib//b.obj/speed : yfc-link ;
10 | make b.exe : a.obj : yfc-link : MACROS ;
11 | make a.obj : a.cpp : yfc-compile ;
12 |
--------------------------------------------------------------------------------
/src/tools/features/rtti-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.rtti]]`rtti`::
11 | *Allowed values:* `on`, `off`.
12 | +
13 | Disables run-time type information.
14 |
15 | |# # end::doc[]
16 |
17 | feature.feature rtti
18 | : on off
19 | : propagated ;
20 |
--------------------------------------------------------------------------------
/src/tools/types/asm.jam:
--------------------------------------------------------------------------------
1 | # Copyright Craig Rodrigues 2005. Distributed under the Boost
2 | # Software License, Version 1.0. (See accompanying
3 | # file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
4 | import scanner ;
5 | import type ;
6 | import types/cpp ;
7 |
8 | type ASM_CPP : s S asm ;
9 | type ASM : : ASM_CPP ;
10 |
11 | # FIXME: Scan for MASM/ARMASM includes
12 | type.set-scanner ASM_CPP : c-scanner ;
13 |
14 | type.set-generated-target-suffix ASM : windows : asm ;
15 |
--------------------------------------------------------------------------------
/example/complex-testing/jamroot.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2016 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 | using testing ;
6 | import property-set ;
7 | import path ;
8 |
9 | exe success : success.cpp ;
10 |
11 | run success : arg1 arg2 : : : success-a ;
12 | run success : arg3 arg4 : : : success-b ;
13 |
14 | run post.cpp : : success-a : : post-a ;
15 | run post.cpp : : success-b : : post-b ;
16 |
--------------------------------------------------------------------------------
/example/contracts/hello.cpp:
--------------------------------------------------------------------------------
1 | // Copyright 2025 René Ferdinand Rivera Morel
2 | // Distributed under the Boost Software License, Version 1.0.
3 | // (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | // tag::source[]
7 | #include
8 | #include
9 |
10 | int f(const int x) pre(x != 0) post(r : r != x)
11 | {
12 | return x + 1;
13 | }
14 |
15 | int main()
16 | {
17 | std::cout << "Hello!\n";
18 | f(1);
19 | f(0);
20 | }
21 | // end::source[]
22 |
--------------------------------------------------------------------------------
/example/sass/jamroot.jam:
--------------------------------------------------------------------------------
1 | #|
2 | Copyright 2017 Dmitry Arkhipov
3 | Distributed under the Boost Software License, Version 1.0. (See
4 | accompanying file LICENSE.txt or copy at
5 | https://www.bfgroup.xyz/b2/LICENSE.txt)
6 | |#
7 |
8 | css stylesheet1 : singleton.scss : "--precision 1" ;
9 | css stylesheet2 : singleton.sass ;
10 | css stylesheet3 : importing.scss : include ;
11 | css stylesheet4
12 | : singleton.scss
13 | : expanded
14 | off
15 | ;
16 |
--------------------------------------------------------------------------------
/src/engine/patchlevel.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc.
3 | *
4 | * This file is part of Jam - see jam.c for Copyright information.
5 | */
6 |
7 | /*
8 | This file is ALSO:
9 | Copyright 2018-2024 Rene Rivera
10 | Distributed under the Boost Software License, Version 1.0.
11 | (See accompanying file LICENSE.txt or copy at
12 | https://www.bfgroup.xyz/b2/LICENSE.txt)
13 | */
14 |
15 | #define VERSION_MAJOR 5
16 | #define VERSION_MINOR 4
17 | #define VERSION_PATCH 0
18 |
--------------------------------------------------------------------------------
/src/tools/features/asmflags-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.asmflags]]`asmflags`::
11 | The value of this feature is passed without modification to the assembler.
12 |
13 | |# # end::doc[]
14 |
15 | feature.feature asmflags
16 | :
17 | : free optional ;
18 |
--------------------------------------------------------------------------------
/src/tools/features/cxxabi-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.cxxabi]]`c++abi`::
11 | Selects a specific variant of C++ ABI if the compiler supports several.
12 |
13 |
14 | |# # end::doc[]
15 |
16 | feature.feature c++abi
17 | :
18 | : propagated optional ;
19 |
--------------------------------------------------------------------------------
/src/tools/features/link-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.link]]`link`::
11 | *Allowed values:* `shared`, `static`
12 | +
13 | Controls how libraries are built.
14 |
15 | |# # end::doc[]
16 |
17 | feature.feature link
18 | : shared static
19 | : propagated ;
20 |
--------------------------------------------------------------------------------
/example/qt/qt4/moccable-cpp/jamroot.jam:
--------------------------------------------------------------------------------
1 |
2 | import qt4 ;
3 | if ! [ qt4.initialized ]
4 | {
5 | ECHO "Warning: Qt4 not initialized in user-config.jam" ;
6 | ECHO "Assuming /space/p2/ghost/build/Qt4 as location." ;
7 | ECHO "This is very likely won't work for you. " ;
8 | using qt4 : /space/p2/ghost/build/Qt4 ;
9 | }
10 |
11 | import cast ;
12 | exe main : main.cpp
13 | [ cast _ moccable-cpp : main.cpp ]
14 | /qt//QtGui
15 | : multi
16 | ;
17 |
18 |
19 |
--------------------------------------------------------------------------------
/example/variant/jamfile.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2004 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 | #[jamfile
6 | #<< By default, build the project with the two variants we have defined in jamroot.jam.
7 | project : default-build crazy super_release ;
8 |
9 | #<< We build an `a` exe target that links a built library. The library builds with the propagated properties of the exe.
10 | exe a : a.cpp libs//l ;
11 | #]
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.code-workspace
2 | *.py[co]
3 | /.build
4 | /.vscode
5 | /b2
6 | /b2.exe
7 | /bjam
8 | /bjam.exe
9 | /bootstrap.log
10 | /doc/bin
11 | /doc/html
12 | /example/**/bin
13 | /example/gettext/messages
14 | /example/named-install-dirs/bar
15 | /example/named-install-dirs/foo
16 | /example/named-install-dirs/q
17 | /project-config.jam
18 | /src/engine/*.ilk
19 | /src/engine/*.obj
20 | /src/engine/*.pdb
21 | /src/engine/b2
22 | /src/engine/b2.*
23 | /test/file.jam
24 | /test/test_results.txt
25 | build.log
26 | infer-out
27 |
--------------------------------------------------------------------------------
/src/tools/features/fflags-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.fflags]]`fflags`::
11 | The value of this feature is passed without modification to the tool when
12 | compiling Fortran sources.
13 |
14 | |# # end::doc[]
15 |
16 | feature.feature fflags
17 | :
18 | : free optional ;
19 |
--------------------------------------------------------------------------------
/test/example_make.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright (C) Vladimir Prus 2006.
4 | # Distributed under the Boost Software License, Version 1.0. (See
5 | # accompanying file LICENSE.txt or copy at
6 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
7 |
8 | # Test the 'make' example.
9 |
10 | import BoostBuild
11 | import sys
12 |
13 | t = BoostBuild.Tester(['example.python.interpreter=%s' % sys.executable])
14 | t.set_tree("../example/make")
15 | t.run_build_system()
16 | t.expect_addition(["bin/main.cpp"])
17 | t.cleanup()
18 |
--------------------------------------------------------------------------------
/example/customization/readme.txt:
--------------------------------------------------------------------------------
1 | Copyright 2003 Vladimir Prus
2 | Distributed under the Boost Software License, Version 1.0.
3 | (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
4 |
5 |
6 | This example show how to add a new target type and a new tool support to
7 | B2. Please refer to extender manual for a complete description of this
8 | example.
9 |
10 | Note that this example requires Python. If cygwin Python on Windows is to be
11 | used, please go to "verbatim.jam" and follow instructions there.
12 |
--------------------------------------------------------------------------------
/src/engine/headers.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1993, 1995 Christopher Seiwald.
3 | *
4 | * This file is part of Jam - see jam.c for Copyright information.
5 | */
6 |
7 | /*
8 | * headers.h - handle #includes in source files
9 | */
10 |
11 | #ifndef HEADERS_SW20111118_H
12 | #define HEADERS_SW20111118_H
13 |
14 | #include "config.h"
15 | #include "object.h"
16 | #include "rules.h"
17 | #include "regexp.h"
18 |
19 | void headers( TARGET * t );
20 |
21 | LIST * headers1( LIST *l, OBJECT * file, int rec, b2::regex::program re[] );
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/src/tools/features/include-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.include]]`include`::
11 | Specifies an additional include path that is to be passed to C and {CPP}
12 | compilers.
13 |
14 | |# # end::doc[]
15 |
16 | feature.feature "include"
17 | :
18 | : free path #order-sensitive
19 | ;
20 |
--------------------------------------------------------------------------------
/src/engine/check_clib.cpp:
--------------------------------------------------------------------------------
1 | /* Copyright 2021 Rene Rivera
2 | * Distributed under the Boost Software License, Version 1.0.
3 | * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 | */
5 |
6 | /*
7 | This program is a compile test for support of clib use.
8 | This is used by the build script to guess and check the compiler to build the engine with.
9 | */
10 |
11 | // Some headers we depend on..
12 | #include
13 |
14 |
15 | int check_clib()
16 | {
17 | { auto _ = strdup("-"); }
18 | return 0;
19 | }
20 |
--------------------------------------------------------------------------------
/src/tools/features/internal-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | # TODO: Documentation.
7 |
8 | import feature ;
9 |
10 | # Internal feature.
11 | feature.feature library-file
12 | :
13 | : free dependency ;
14 |
15 | # Internal feature used to store the name of a bjam action to call when building
16 | # a target.
17 | feature.feature action
18 | :
19 | : free ;
20 |
--------------------------------------------------------------------------------
/test/qt5/qtcharts.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2015
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtCharts
7 | #include
8 |
9 | #include
10 |
11 | BOOST_AUTO_TEST_CASE (defines)
12 | {
13 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WIDGETS_LIB), true);
14 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CHARTS_LIB), true);
15 | }
16 |
--------------------------------------------------------------------------------
/test/toolset-mock/src/Jamroot.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Steven Watanabe
2 | #
3 | # Distributed under the Boost Software License, Version 1.0.
4 | # (See accompanying file LICENSE.txt or copy at
5 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | import print ;
8 | import feature ;
9 |
10 | rule write-target-os ( target : : properties * )
11 | {
12 | local target-os = [ feature.defaults ] ;
13 | print.output $(target) ;
14 | print.text $(target-os:G=) : true ;
15 | }
16 |
17 | make target-os.txt : : @write-target-os ;
18 |
--------------------------------------------------------------------------------
/example/generate/README.txt:
--------------------------------------------------------------------------------
1 | # Copyright 2007 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
4 |
5 | This example shows the 'generate' rule, that allows you to construct target
6 | using any arbitrary set of transformation and commands.
7 |
8 | The rule is similar to 'make' and 'notfile', but unlike those, you can operate
9 | in terms of B2 'virtual targets', which is more flexible.
10 |
11 | Please consult the docs for more explanations.
12 |
--------------------------------------------------------------------------------
/example/make/jamroot.jam:
--------------------------------------------------------------------------------
1 | import feature ;
2 | import toolset ;
3 | import os ;
4 |
5 | path-constant HERE : . ;
6 | make main.cpp : main_cpp.pro : @do-something ;
7 |
8 | feature.feature example.python.interpreter : : free ;
9 |
10 | toolset.flags do-something PYTHON : ;
11 | actions do-something
12 | {
13 | "$(PYTHON:E=python)" "$(HERE)/foo.py" "$(>)" "$(<)"
14 | }
15 |
16 | if [ os.name ] = VMS
17 | {
18 | actions do-something
19 | {
20 | $(PYTHON:E=python) $(HERE:W)foo.py $(>:W) $(<:W)
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/tools/features/location-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.location]]`location`::
11 | Specifies the build directory for a target. The feature is used primarily with
12 | <`>> rule.
13 |
14 | |# # end::doc[]
15 |
16 | feature.feature location
17 | :
18 | : free path ;
19 |
--------------------------------------------------------------------------------
/test/qt4.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # (c) Copyright Juergen Hunold 2008
4 | # Use, modification, and distribution are subject to the
5 | # Boost Software License, Version 1.0. (See accompanying file
6 | # LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
7 |
8 | import BoostBuild
9 | import os
10 |
11 | # Run test in real directory in order to find Boost.Test via Boost Top-Level
12 | # Jamroot.
13 | qt4_dir = os.getcwd() + "/qt4"
14 |
15 | t = BoostBuild.Tester(workdir=qt4_dir)
16 |
17 | t.run_build_system()
18 |
19 | t.cleanup()
20 |
--------------------------------------------------------------------------------
/example/generate/gen.py:
--------------------------------------------------------------------------------
1 |
2 | from b2.build.virtual_target import NonScanningAction, FileTarget
3 |
4 | def generate_example(project, name, ps, sources):
5 |
6 | result = []
7 | for s in sources:
8 |
9 | a = NonScanningAction([s], "common.copy", ps)
10 |
11 | # Create a target to represent the action result. Uses the target name
12 | # passed here via the 'name' parameter and the same type and project as
13 | # the source.
14 | result.append(FileTarget(name, s.type(), project, a))
15 |
16 | return result
17 |
--------------------------------------------------------------------------------
/doc/src/code_ref.adoc:
--------------------------------------------------------------------------------
1 | [[b2.reference.code]]
2 | = Implementation Reference
3 |
4 | This includes reference documentation for the internals of the B2 engine code.
5 | Even though the Jam facing build system interfaces are also implemented in the
6 | engine, they are documented in the general reference section. This goes deeper
7 | and includes parts of engine mechanism and data structures. It is meant for
8 | those making changes to the engine itself.
9 |
10 | :leveloffset: +1
11 |
12 | include::../../src/engine/lists.h[tag=reference]
13 |
14 | :leveloffset: -1
15 |
--------------------------------------------------------------------------------
/src/tools/features/archiveflags-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.archiveflags]]`archiveflags`::
11 | The value of this feature is passed without modification to the archiver tool
12 | when creating static libraries.
13 |
14 | |# # end::doc[]
15 |
16 | feature.feature archiveflags
17 | :
18 | : free optional ;
19 |
--------------------------------------------------------------------------------
/src/engine/hdrmacro.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1993, 1995 Christopher Seiwald.
3 | *
4 | * This file is part of Jam - see jam.c for Copyright information.
5 | */
6 |
7 | /*
8 | * hdrmacro.h - parses header files for #define MACRO or
9 | * #define MACRO "filename" definitions
10 | */
11 |
12 | #ifndef HDRMACRO_SW20111118_H
13 | #define HDRMACRO_SW20111118_H
14 |
15 | #include "config.h"
16 | #include "object.h"
17 | #include "rules.h"
18 |
19 | void macro_headers( TARGET * );
20 | OBJECT * macro_header_get( OBJECT * macro_name );
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/.ci/azp-linux-sanitizer-test.yml:
--------------------------------------------------------------------------------
1 | steps:
2 | - bash: |
3 | set -e
4 | uname -a
5 | ./.ci/linux-cxx-install.sh
6 | displayName: Install
7 | - bash: |
8 | set -e
9 | cd src/engine
10 | set PATH=${PATH};${CXX_PATH}
11 | ./build.sh ${TOOLSET}
12 | ./b2 -v
13 | cd ../..
14 | ./src/engine/b2 -a ${SANITIZER}=on optimization=debug toolset=${TOOLSET} b2
15 | displayName: Build
16 | - bash: |
17 | set -e
18 | export B2=`find ${PWD}/.build -name b2b2`
19 | cd test
20 | ./test_all.py ${TOOLSET}
21 | cd ..
22 | displayName: Test
23 |
--------------------------------------------------------------------------------
/src/tools/features/file-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.file]]`file`::
11 | When used in requirements of a prebuilt library target this feature specifies
12 | the path to the library file. See <> for examples.
13 |
14 | |# # end::doc[]
15 |
16 | feature.feature file
17 | :
18 | : free dependency incidental ;
19 |
--------------------------------------------------------------------------------
/src/tools/features/version-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.version]]`version`::
11 | This feature isn't used by any of the builtin tools, but can be used, for
12 | example, to adjust target's name via <`>>
13 | feature.
14 |
15 | |# # end::doc[]
16 |
17 | feature.feature version
18 | :
19 | : free ;
20 |
--------------------------------------------------------------------------------
/test/example_customization.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright (C) Vladimir Prus 2006.
4 | # Distributed under the Boost Software License, Version 1.0. (See
5 | # accompanying file LICENSE.txt or copy at
6 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
7 |
8 | # Test the 'customization' example.
9 |
10 | import BoostBuild
11 |
12 | t = BoostBuild.Tester()
13 |
14 | t.set_tree("../example/customization")
15 |
16 | t.run_build_system()
17 |
18 | t.expect_addition(["bin/$toolset/debug*/codegen.exe",
19 | "bin/$toolset/debug*/usage.cpp"])
20 |
21 | t.cleanup()
22 |
--------------------------------------------------------------------------------
/test/no_type.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright 2002 Vladimir Prus
4 | # Distributed under the Boost Software License, Version 1.0.
5 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | # Test that we cannot specify targets of unknown type as sources. This is based
8 | # on the fact that Unix 'ar' will happily consume just about anything.
9 |
10 | import BoostBuild
11 |
12 | t = BoostBuild.Tester()
13 |
14 | t.write("jamroot.jam", "static-lib a : a.foo ;")
15 | t.write("a.foo", "")
16 |
17 | t.run_build_system(status=1)
18 |
19 | t.cleanup()
20 |
--------------------------------------------------------------------------------
/src/tools/features/flags-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.flags]]`flags`::
11 | This feature is used for generic, i.e. non-language specific, flags for tools.
12 | The value of this feature is passed without modification to the tool that will
13 | build the target.
14 |
15 | |# # end::doc[]
16 |
17 | feature.feature flags
18 | :
19 | : free optional ;
20 |
--------------------------------------------------------------------------------
/src/tools/qt.jam:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2006 Vladimir Prus.
2 | #
3 | # Use, modification and distribution is subject to the Boost Software
4 | # License Version 1.0. (See accompanying file LICENSE.txt or
5 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | # Forwarning toolset file to Qt GUI library. Forwards to the toolset file
8 | # for the current version of Qt.
9 |
10 | import qt4 ;
11 |
12 | rule init ( prefix : full_bin ? : full_inc ? : full_lib ? : version ? : condition * )
13 | {
14 | qt4.init $(prefix) : $(full_bin) : $(full_inc) : $(full_lib) : $(version) : $(condition) ;
15 | }
16 |
17 |
18 |
--------------------------------------------------------------------------------
/example/qt/qt3/uic/main.cpp:
--------------------------------------------------------------------------------
1 | // Copyright Felix E. Klee, 2003
2 | // Distributed under the Boost Software License, Version 1.0.
3 | // (See accompanying file LICENSE.txt
4 | // or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #include "hello_world_widget.h"
7 | #include
8 |
9 | #include
10 |
11 | int main(int argc, char **argv) {
12 | QApplication a(argc, argv);
13 | HelloWorldWidget w;
14 | QObject::connect(static_cast(w.OkButton), SIGNAL(clicked()), &w, SLOT(close()));
15 | a.setMainWidget(&w);
16 | w.show();
17 | return a.exec();
18 | }
19 |
--------------------------------------------------------------------------------
/src/tools/features/location-prefix-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.location-prefix]]`location-prefix`::
11 | Sets the build directory for a target as the project’s build directory prefixed
12 | with the value of this feature. See section <> for an example.
13 |
14 | |# # end::doc[]
15 |
16 | feature.feature location-prefix
17 | :
18 | : free ;
19 |
--------------------------------------------------------------------------------
/test/core_syntax_error_exit_status.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright (C) Mateusz Loskot 2020.
4 | # Distributed under the Boost Software License, Version 1.0. (See
5 | # accompanying file LICENSE.txt or copy at
6 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
7 |
8 | # Test that Jam syntax error results in non-zero exit status
9 |
10 | import BoostBuild
11 |
12 | # Create a temporary working directory.
13 | t = BoostBuild.Tester()
14 |
15 | # Create the needed files.
16 | t.write("jamroot.jam", """
17 | exe hello : hello.cpp
18 |
19 | """)
20 |
21 | t.run_build_system(status=1)
22 |
23 | t.cleanup()
24 |
--------------------------------------------------------------------------------
/example/variant/jamroot.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2004 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 | #[jamroot
6 | #<< Define a build variant which is just combination of four properties.
7 | variant crazy : speed off
8 | on on ;
9 |
10 | #<< Define a built variant inherited from 'release'. It defines one new property and gets all properties from the parent `release` variant.
11 | variant super_release : release : USE_ASM ;
12 | #]
13 |
--------------------------------------------------------------------------------
/src/tools/features/allow-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.allow]]`allow`::
11 | This feature is used to allow specific generators to run. For example, Qt tools
12 | can only be invoked when Qt library is used. In that case, `qt` will be
13 | in usage requirement of the library.
14 |
15 | |# # end::doc[]
16 |
17 | feature.feature allow
18 | :
19 | : free ;
20 |
--------------------------------------------------------------------------------
/test/example_libraries.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright (C) Vladimir Prus 2006.
4 | # Distributed under the Boost Software License, Version 1.0. (See
5 | # accompanying file LICENSE.txt or copy at
6 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
7 |
8 | # Test the 'libraries' example.
9 |
10 | import BoostBuild
11 |
12 | t = BoostBuild.Tester(use_test_config=False)
13 |
14 | t.set_tree("../example/libraries")
15 |
16 | t.run_build_system(["link=shared"])
17 |
18 | t.expect_addition(["app/bin/$toolset/debug*/app.exe",
19 | "util/foo/bin/$toolset/debug*/bar.dll"])
20 |
21 | t.cleanup()
22 |
--------------------------------------------------------------------------------
/test/qt4/rcc.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2012
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtCore
7 | #include
8 |
9 | #include
10 |
11 | std::ostream& operator<<(std::ostream& out, QString const& text)
12 | {
13 | out << text.toUtf8().constData();
14 | return out;
15 | }
16 |
17 | BOOST_AUTO_TEST_CASE (check_exists)
18 | {
19 | BOOST_CHECK(QFile::exists(":/test/rcc.cpp"));
20 | }
21 |
--------------------------------------------------------------------------------
/test/qt5/rcc.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2012
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtCore
7 | #include
8 |
9 | #include
10 |
11 | std::ostream& operator<<(std::ostream& out, QString const& text)
12 | {
13 | out << text.toUtf8().constData();
14 | return out;
15 | }
16 |
17 | BOOST_AUTO_TEST_CASE (check_exists)
18 | {
19 | BOOST_CHECK(QFile::exists(":/test/rcc.cpp"));
20 | }
21 |
--------------------------------------------------------------------------------
/src/engine/search.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 1993, 1995 Christopher Seiwald.
3 | *
4 | * This file is part of Jam - see jam.c for Copyright information.
5 | */
6 |
7 | /*
8 | * search.h - find a target along $(SEARCH) or $(LOCATE)
9 | */
10 |
11 | #ifndef SEARCH_SW20111118_H
12 | #define SEARCH_SW20111118_H
13 |
14 | #include "config.h"
15 | #include "object.h"
16 | #include "timestamp.h"
17 |
18 | void set_explicit_binding( OBJECT * target, OBJECT * locate );
19 | OBJECT * search( OBJECT * target, timestamp * const time,
20 | OBJECT * * another_target, int const file );
21 | void search_done( void );
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/test/qt4/qtcore.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2008
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtCore
7 | #include
8 |
9 | #include
10 |
11 | BOOST_AUTO_TEST_CASE (defines)
12 | {
13 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
14 | }
15 |
16 |
17 | BOOST_AUTO_TEST_CASE( qstring_test)
18 | {
19 | QString dummy;
20 |
21 | BOOST_CHECK_EQUAL(dummy.isEmpty(), true);
22 | }
23 |
--------------------------------------------------------------------------------
/test/qt5/qtcore.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2012
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtCore
7 | #include
8 |
9 | #include
10 |
11 | BOOST_AUTO_TEST_CASE (defines)
12 | {
13 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
14 | }
15 |
16 |
17 | BOOST_AUTO_TEST_CASE( qstring_test)
18 | {
19 | QString dummy;
20 |
21 | BOOST_CHECK_EQUAL(dummy.isEmpty(), true);
22 | }
23 |
--------------------------------------------------------------------------------
/doc/src/examples.adoc:
--------------------------------------------------------------------------------
1 | = Examples
2 |
3 | == Introduction
4 |
5 | Here we include a collection of simple to complex fully working examples of
6 | using Boost Build v2 for various tasks. They show the gamut from simple
7 | to advanced features. If you find yourself looking at the examples and not
8 | finding something you want to see working please post to our support list
9 | and we'll try and come up with a solution and add it here for others to learn
10 | from.
11 |
12 | :leveloffset: +1
13 |
14 | include::../../example/hello/readme.adoc[]
15 |
16 | include::../../example/sanitizers/readme.adoc[]
17 |
18 | :leveloffset: -1
19 |
--------------------------------------------------------------------------------
/src/tools/features/search-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.search]]`search`::
11 | When used in requirements of a prebuilt library target this feature adds to the
12 | list of directories to search for the library file. See <>
13 | for examples.
14 |
15 | |# # end::doc[]
16 |
17 | feature.feature search
18 | :
19 | : free path #order-sensitive
20 | ;
21 |
--------------------------------------------------------------------------------
/src/tools/features/linemarkers-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2023 Nikita Kniazev
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.linemarkers]]`linemarkers`::
11 | *Allowed values:* `off`.
12 | +
13 | On preprocessing targets changes behavior to emit/omit line directives
14 | like `\#line` and `#_linenum_`.
15 | +
16 | *NOTE:* The value doesn't propagate.
17 |
18 | |# # end::doc[]
19 |
20 | feature.feature linemarkers
21 | : off
22 | : optional ;
23 |
--------------------------------------------------------------------------------
/src/tools/features/toolset-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.toolset]]`toolset`::
11 | *Allowed values:* any of the toolset modules.
12 | +
13 | Selects the toolset that will be used to build binary targets. The full list of
14 | toolset modules is in the <> section.
15 |
16 | |# # end::doc[]
17 |
18 | feature.feature toolset
19 | :
20 | : implicit propagated symmetric ;
21 |
--------------------------------------------------------------------------------
/test/qt4/qtcorefail.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2008
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtCoreFail
7 |
8 | #include
9 |
10 | #include
11 |
12 | BOOST_AUTO_TEST_CASE (defines)
13 | {
14 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
15 | }
16 |
17 |
18 | BOOST_AUTO_TEST_CASE( qstring_test)
19 | {
20 | QString dummy;
21 |
22 | BOOST_CHECK_EQUAL(dummy.isEmpty(), true);
23 | }
24 |
--------------------------------------------------------------------------------
/test/qt5/qtcorefail.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2012
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtCoreFail
7 |
8 | #include
9 |
10 | #include
11 |
12 | BOOST_AUTO_TEST_CASE (defines)
13 | {
14 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
15 | }
16 |
17 |
18 | BOOST_AUTO_TEST_CASE( qstring_test)
19 | {
20 | QString dummy;
21 |
22 | BOOST_CHECK_EQUAL(dummy.isEmpty(), true);
23 | }
24 |
--------------------------------------------------------------------------------
/test/bad_dirname.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright 2003 Vladimir Prus
4 | # Distributed under the Boost Software License, Version 1.0.
5 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | # Regression test: when directory of project root contained regex
8 | # metacharacters, B2 failed to work. Bug reported by Michael Stevens.
9 |
10 | import BoostBuild
11 |
12 | t = BoostBuild.Tester()
13 |
14 | t.write("bad[abc]dirname/jamfile.jam", """
15 | """)
16 |
17 | t.write("bad[abc]dirname/jamroot.jam", """
18 | """)
19 |
20 | t.run_build_system(subdir="bad[abc]dirname")
21 |
22 | t.cleanup()
23 |
--------------------------------------------------------------------------------
/test/loop.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright 2003 Vladimir Prus
4 | # Distributed under the Boost Software License, Version 1.0.
5 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | import BoostBuild
8 | import string
9 |
10 | t = BoostBuild.Tester()
11 |
12 | t.write("jamroot.jam", """\
13 | lib main : main.cpp l ;
14 | lib l : l.cpp main ;
15 | """)
16 |
17 | t.write("main.cpp", "")
18 | t.write("l.cpp", "")
19 |
20 | t.run_build_system(["--no-error-backtrace"], status=1)
21 | t.fail_test(t.stdout().find(
22 | "error: Recursion in main target references") == -1)
23 |
24 | t.cleanup()
25 |
--------------------------------------------------------------------------------
/test/qt4/mock.h:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2011
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #include
7 |
8 | class Mock : public QObject
9 | {
10 | /*!
11 | Test that the moc gets the necessary #defines
12 | Else the moc will not see the Q_OBJECT macro, issue a warning
13 | and linking will fail due to missing vtable symbols.
14 | */
15 | #if defined(TEST_MOCK)
16 | Q_OBJECT
17 | #endif
18 | public:
19 |
20 | Mock();
21 | };
22 |
--------------------------------------------------------------------------------
/test/qt4/qtsvg.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2008
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtSvg
7 |
8 | #include
9 |
10 | #include
11 |
12 | BOOST_AUTO_TEST_CASE( defines)
13 | {
14 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
15 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_SVG_LIB), true);
16 | }
17 |
18 | BOOST_AUTO_TEST_CASE( generator_construct)
19 | {
20 | QSvgGenerator generator;
21 | }
22 |
--------------------------------------------------------------------------------
/test/qt5/mock.h:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2012
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #include
7 |
8 | class Mock : public QObject
9 | {
10 | /*!
11 | Test that the moc gets the necessary #defines
12 | Else the moc will not see the Q_OBJECT macro, issue a warning
13 | and linking will fail due to missing vtable symbols.
14 | */
15 | #if defined(TEST_MOCK)
16 | Q_OBJECT
17 | #endif
18 | public:
19 |
20 | Mock();
21 | };
22 |
--------------------------------------------------------------------------------
/test/qt5/qtsvg.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2012
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtSvg
7 |
8 | #include
9 |
10 | #include
11 |
12 | BOOST_AUTO_TEST_CASE( defines)
13 | {
14 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
15 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_SVG_LIB), true);
16 | }
17 |
18 | BOOST_AUTO_TEST_CASE( generator_construct)
19 | {
20 | QSvgGenerator generator;
21 | }
22 |
--------------------------------------------------------------------------------
/test/composite.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright 2003 Vladimir Prus
4 | # Distributed under the Boost Software License, Version 1.0.
5 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | # Test that composite properties are handled correctly.
8 |
9 | import BoostBuild
10 |
11 | t = BoostBuild.Tester(use_test_config=False)
12 |
13 | t.write("jamroot.jam", """
14 | exe hello : hello.cpp : release ;
15 | """)
16 |
17 | t.write("hello.cpp", """
18 | int main() {}
19 | """)
20 |
21 | t.run_build_system()
22 |
23 | t.expect_addition("bin/$toolset/release*/hello.exe")
24 |
25 | t.cleanup()
26 |
--------------------------------------------------------------------------------
/test/exit_status.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright (C) Vladimir Prus 2010.
4 | # Distributed under the Boost Software License, Version 1.0. (See
5 | # accompanying file LICENSE.txt or copy at
6 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
7 |
8 | # Test that build failure results in non-zero exit status
9 |
10 | import BoostBuild
11 |
12 | # Create a temporary working directory.
13 | t = BoostBuild.Tester()
14 |
15 | # Create the needed files.
16 | t.write("jamroot.jam", """
17 | exe hello : hello.cpp ;
18 | """)
19 |
20 | t.write("hello.cpp", """
21 | int main() {
22 | """)
23 |
24 | t.run_build_system(status=1)
25 |
26 | t.cleanup()
27 |
--------------------------------------------------------------------------------
/.ci/b2_example.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | set -e
4 |
5 | cdir=${PWD}
6 | cd $1
7 | $HOME/temp/.b2/bin/b2 -d+2 ${B2_ARGS}
8 | echo "-----"
9 | find . -perm -111 -type f -exec file "{}" "+"
10 | echo "-----"
11 | find . -name "*.o" -exec file "{}" "+"
12 | echo "-----"
13 | find . -name "*.a" -exec file "{}" "+"
14 | echo "-----"
15 | find . -name "*.so" -exec file "{}" "+"
16 | echo "-----"
17 | find . -name "*.dylib" -exec file "{}" "+"
18 | echo "-----"
19 | cd ${cdir}
20 |
21 | # Use, modification, and distribution are
22 | # subject to the Boost Software License, Version 1.0. (See accompanying
23 | # file LICENSE.txt)
24 | #
25 | # Copyright Rene Rivera 2022.
26 |
--------------------------------------------------------------------------------
/example/qt/qt4/uic/jamroot.jam:
--------------------------------------------------------------------------------
1 | # Copyright Felix E. Klee, 2003
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt
4 | # or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import qt4 ;
7 | if ! [ qt4.initialized ]
8 | {
9 | ECHO "Warning: Qt4 not initialized in user-config.jam" ;
10 | ECHO "Assuming /space/p2/ghost/build/Qt4 as location." ;
11 | ECHO "This is very likely won't work for you. " ;
12 | using qt4 : /space/p2/ghost/build/Qt4 ;
13 | }
14 |
15 | project : requirements multi
16 | ;
17 |
18 | exe hello : main.cpp hello_world_widget.ui : /qt//QtGui ;
19 |
--------------------------------------------------------------------------------
/example/qt/qt4/uic/main.cpp:
--------------------------------------------------------------------------------
1 | // Copyright Felix E. Klee, 2003
2 | // Distributed under the Boost Software License, Version 1.0.
3 | // (See accompanying file LICENSE.txt
4 | // or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #include "ui_hello_world_widget.h"
7 | #include
8 | #include
9 |
10 | #include
11 |
12 | int main(int argc, char **argv) {
13 | QApplication a(argc, argv);
14 |
15 | QWidget w;
16 | Ui::HelloWorldWidget wm;
17 | wm.setupUi(&w);
18 |
19 | QObject::connect(wm.OkButton, SIGNAL(clicked()), &w, SLOT(close()));
20 |
21 | w.show();
22 | return a.exec();
23 | }
24 |
--------------------------------------------------------------------------------
/src/tools/features/compileflags-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2020 René Ferdinand Rivera Morell
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.compileflags]]`compileflags`::
11 | The value of this feature is passed without modification to the corresponding
12 | tools. The values from the `compileflags` is applied to all compilation of any
13 | language for the tools.
14 |
15 | |# # end::doc[]
16 |
17 | feature.feature compileflags
18 | :
19 | : free optional ;
20 |
--------------------------------------------------------------------------------
/src/tools/types/adoc.jam:
--------------------------------------------------------------------------------
1 | #|
2 | Copyright 2017 Rene Rivera
3 | Distributed under the Boost Software License, Version 1.0. (See
4 | accompanying file LICENSE.txt or copy at
5 | https://www.bfgroup.xyz/b2/LICENSE.txt)
6 | |#
7 |
8 | import scanner ;
9 | import type ;
10 |
11 | type ASCIIDOC : adoc asciidoc ;
12 |
13 | class asciidoc-scanner : common-scanner
14 | {
15 | rule pattern ( )
16 | {
17 | return
18 | "include::([^[]+)"
19 | "image::([^[]+)"
20 | "image:([^[]+)"
21 | ;
22 | }
23 | }
24 |
25 | scanner.register asciidoc-scanner : include ;
26 | type.set-scanner ASCIIDOC : asciidoc-scanner ;
27 |
--------------------------------------------------------------------------------
/test/qt5/qt3dlogic.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2015
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE Qt3DLogic
7 | #include
8 |
9 | #include
10 |
11 | BOOST_AUTO_TEST_CASE (defines)
12 | {
13 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_3DCORE_LIB), true);
14 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_3DLOGIC_LIB), true);
15 | }
16 |
17 | BOOST_AUTO_TEST_CASE ( sample_code )
18 | {
19 | Qt3DLogic::QLogicAspect logicAspect;
20 | }
21 |
--------------------------------------------------------------------------------
/src/tools/lex.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2003 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 | import type ;
6 | import generators ;
7 | import feature ;
8 | import toolset : flags ;
9 |
10 | feature.feature flex.prefix : : free ;
11 | type.register LEX : l ;
12 | type.register LEX++ : ll ;
13 | generators.register-standard lex.lex : LEX : C ;
14 | generators.register-standard lex.lex : LEX++ : CPP ;
15 |
16 | rule init ( )
17 | {
18 | }
19 |
20 | flags lex.lex PREFIX ;
21 |
22 | actions lex
23 | {
24 | flex -P$(PREFIX) -o$(<) $(>)
25 | }
26 |
--------------------------------------------------------------------------------
/test/prebuilt/ext/jamfile3.jam:
--------------------------------------------------------------------------------
1 |
2 | # This Jamfile is the same as Jamfile2, except that
3 | # it tries to access prebuilt targets using absolute
4 | # paths. It used to be broken on Windows.
5 |
6 | import modules ;
7 | LIBNAME = [ modules.peek : LIBNAME ] ;
8 |
9 | project ext ;
10 |
11 | # Assumed bjam was invoked from the project root
12 | local pwd = [ PWD ] ;
13 |
14 | lib a :
15 | : $(pwd)/ext/debug/$(LIBNAME:E=LIBNAME-not-defined) debug
16 | :
17 | : debug
18 | ;
19 |
20 | lib a :
21 | : $(pwd)/ext/release/$(LIBNAME:E=LIBNAME-not-defined) release
22 | :
23 | : release
24 | ;
25 |
26 |
--------------------------------------------------------------------------------
/test/qt5.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # (c) Copyright Juergen Hunold 2012
4 | # Use, modification, and distribution are subject to the
5 | # Boost Software License, Version 1.0. (See accompanying file
6 | # LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
7 |
8 | import BoostBuild
9 | import os
10 |
11 | # Run test in real directory in order to find Boost.Test via Boost Top-Level
12 | # Jamroot.
13 | qt5_dir = os.path.dirname(os.path.abspath(__file__)) + "/qt5"
14 |
15 | t = BoostBuild.Tester(workdir=qt5_dir)
16 |
17 | t.run_build_system()
18 | # Fails if a warning is thrown
19 | t.fail_test( t.stdout().find("warning") != -1 )
20 | t.cleanup()
21 |
--------------------------------------------------------------------------------
/test/qt4/qtassistant.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2008
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtAssistant
7 |
8 | #include
9 |
10 | #include
11 |
12 | BOOST_AUTO_TEST_CASE( defines)
13 | {
14 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
15 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
16 | }
17 |
18 | BOOST_AUTO_TEST_CASE( empty_assistant)
19 | {
20 | QAssistantClient client(QString());
21 | }
22 |
--------------------------------------------------------------------------------
/test/qt5/qtassistant.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2012
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtAssistant
7 |
8 | #include
9 |
10 | #include
11 |
12 | BOOST_AUTO_TEST_CASE( defines)
13 | {
14 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
15 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
16 | }
17 |
18 | BOOST_AUTO_TEST_CASE( empty_assistant)
19 | {
20 | QAssistantClient client(QString());
21 | }
22 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # Copyright 2018 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or http://www.boost.org/LICENSE_1_0.txt)
4 |
5 | root = true
6 |
7 | [*]
8 | charset = utf-8
9 | indent_size = 4
10 | indent_style = tab
11 | tab_width = 4
12 | trim_trailing_whitespace = true
13 |
14 | [*.yml]
15 | indent_size = 2
16 | indent_style = space
17 |
18 | [*.clang-format]
19 | indent_size = 1
20 | indent_style = space
21 |
22 | [*.jam]
23 | indent_style = space
24 |
25 | [*.sh]
26 | indent_style = space
27 |
28 | [.clangd]
29 | indent_size = 2
30 | indent_style = space
31 |
32 | [*.py]
33 | indent_style = space
34 |
--------------------------------------------------------------------------------
/src/tools/generators/dummy-generator.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2002-2017 Rene Rivera
2 | # Copyright 2002-2017 Vladimir Prus
3 | # Distributed under the Boost Software License, Version 1.0.
4 | # (See accompanying file LICENSE.txt or copy at
5 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | import generators ;
8 |
9 | # Generator that accepts everything and produces nothing. Useful as a general
10 | # fallback for toolset-specific actions like PCH generation.
11 | #
12 | class dummy-generator : generator
13 | {
14 | import property-set ;
15 |
16 | rule run ( project name ? : property-set : sources + )
17 | {
18 | return [ property-set.empty ] ;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/test/core_action_status.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright 2007 Rene Rivera.
4 | # Copyright 2011 Steven Watanabe
5 | # Distributed under the Boost Software License, Version 1.0.
6 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
7 |
8 | import BoostBuild
9 |
10 | t = BoostBuild.Tester(pass_toolset=0)
11 |
12 | t.write("file.jam", """\
13 | actions quietly .a. { $(ACTION) }
14 |
15 | rule .a.
16 | {
17 | DEPENDS $(<) : $(>) ;
18 | }
19 |
20 | NOTFILE subtest ;
21 | .a. subtest_a : subtest ;
22 | DEPENDS all : subtest_a ;
23 | """)
24 |
25 | t.run_build_system(["-ffile.jam", "-sACTION=invalid"], status=1)
26 |
27 | t.cleanup()
28 |
--------------------------------------------------------------------------------
/src/engine/mod_path.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2022 René Ferdinand Rivera Morell
3 | Distributed under the Boost Software License, Version 1.0.
4 | (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
5 | */
6 |
7 | #include "mod_path.h"
8 |
9 | #include "constants.h"
10 | #include "filesys.h"
11 | #include "pathsys.h"
12 |
13 | namespace b2 { namespace paths {
14 |
15 | bool exists(value_ref location) { return file_query(location) != nullptr; }
16 |
17 | list_ref normalize_all(list_cref paths)
18 | {
19 | list_ref result;
20 | for (auto path : paths) result.push_back(normalize(path->str()));
21 | return result;
22 | }
23 |
24 | }} // namespace b2::paths
25 |
--------------------------------------------------------------------------------
/test/property_expansion.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright 2003 Vladimir Prus
4 | # Distributed under the Boost Software License, Version 1.0.
5 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | # Test that free property inside.
8 |
9 | import BoostBuild
10 |
11 | t = BoostBuild.Tester(use_test_config=False)
12 |
13 | t.write("jamroot.jam", """\
14 | variant debug-AA : debug : AA ;
15 | alias all : hello ;
16 | exe hello : hello.cpp ;
17 | explicit hello ;
18 | """)
19 |
20 | t.write("hello.cpp", """\
21 | #ifdef AA
22 | int main() {}
23 | #endif
24 | """)
25 |
26 | t.run_build_system(["debug-AA"])
27 |
28 | t.cleanup()
29 |
--------------------------------------------------------------------------------
/test/qt5/qtquick.qml:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2012
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
4 | // http://www.boost.org/LICENSE_1_0.txt)
5 |
6 | import QtQuick 2.0
7 |
8 | Rectangle {
9 | id: page
10 | width: 400; height: 200
11 | color: "#d6d6d6"
12 | Text {
13 | id: helloText
14 | text: "B2 built!"
15 | color: "darkgray"
16 | anchors.horizontalCenter: page.horizontalCenter
17 | anchors.verticalCenter: page.verticalCenter
18 | font.pointSize: 30; font.italic: true ; font.bold: true
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/tools/features/force-include-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2020 Nikita Kniazev
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.force-include]]`force-include`::
11 | Specifies an include path that has to be included in a way like if
12 | `#include "file"` appeared as the first line of every target's source file.
13 |
14 | The include order is not guaranteed if used multiple times on a single target.
15 |
16 | |# # end::doc[]
17 |
18 | feature.feature "force-include"
19 | :
20 | : free
21 | ;
22 |
--------------------------------------------------------------------------------
/test/toolset_msvc.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | #
3 | # Copyright 2022 Nikita Kniazev
4 | #
5 | # Distributed under the Boost Software License, Version 1.0.
6 | # (See accompanying file LICENSE.txt or copy at
7 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
8 |
9 | from TestToolset import test_toolset
10 |
11 | test_toolset("msvc", "14.3", [
12 | ["target-os=windows"],
13 | ["target-os=windows", "release"],
14 | ["target-os=windows", "threading=single"],
15 | ["target-os=windows", "link=static"],
16 | ["target-os=windows", "link=static", "runtime-link=static"],
17 | ["target-os=windows", "windows-api=store"],
18 | ["target-os=windows", "windows-api=phone"],
19 | ])
20 |
--------------------------------------------------------------------------------
/test/project_sub_resolution.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright 2025 Dmitry Arkhipov
4 | # Distributed under the Boost Software License, Version 1.0.
5 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | # Test that subprojects of a project with rooted id can be resolved.
8 |
9 | import BoostBuild
10 |
11 | t = BoostBuild.Tester(use_test_config=False)
12 |
13 | t.write("jamroot.jam", """
14 | project /A ;
15 | alias x ;
16 | alias y : /A/B/C//c ;
17 | alias z : /A/B//b ;
18 | """)
19 |
20 | t.write("B/build.jam", "alias b ;")
21 |
22 | t.write("B/C/build.jam", "alias c ;")
23 |
24 | t.run_build_system()
25 |
26 | t.cleanup()
27 |
--------------------------------------------------------------------------------
/test/qt5/qttest.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2012
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #include
7 |
8 | class QtTest: public QObject
9 | {
10 | /*!
11 | Test if the moc gets the #define
12 | */
13 | #if defined(TEST_MOCK)
14 | Q_OBJECT
15 | #endif
16 |
17 | private Q_SLOTS:
18 | void toUpper();
19 | };
20 |
21 | void
22 | QtTest::toUpper()
23 | {
24 | QString str = "Hello";
25 | QCOMPARE(str.toUpper(), QString("HELLO"));
26 | }
27 |
28 | QTEST_MAIN(QtTest)
29 | #include "qttest.moc"
30 |
31 |
--------------------------------------------------------------------------------
/example/qt/qt4/hello/main.cpp:
--------------------------------------------------------------------------------
1 | // Copyright Vladimir Prus 2005.
2 | // Distributed under the Boost Software License, Version 1.0.
3 | // (See accompanying file LICENSE.txt
4 | // or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #include "arrow.h"
7 |
8 | #include
9 | #include
10 |
11 | int main(int ac, char* av[])
12 | {
13 | QApplication app(ac, av);
14 | Arrow_widget* w = new Arrow_widget;
15 | w->resize(1100, 480);
16 |
17 | QTimer timer;
18 | QObject::connect(&timer, SIGNAL(timeout()),
19 | w, SLOT(slotChangeColor()));
20 |
21 | timer.start(2000);
22 |
23 | w->show();
24 | app.exec();
25 | return 0;
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/src/tools/bison.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2003 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 | import generators ;
6 | import feature ;
7 | import toolset : flags ;
8 | import type ;
9 |
10 | feature.feature bison.prefix : : free ;
11 | type.register Y : y ;
12 | type.register YY : yy ;
13 | generators.register-standard bison.bison : Y : C H ;
14 | generators.register-standard bison.bison : YY : CPP HPP ;
15 |
16 | rule init ( )
17 | {
18 | }
19 |
20 | flags bison.bison PREFIX ;
21 | _ = " " ;
22 |
23 | actions bison
24 | {
25 | bison -p$(_)$(PREFIX) -d -o $(<[1]) $(>)
26 | }
27 |
--------------------------------------------------------------------------------
/test/qt4/qthelp.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2008
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtHelp
7 |
8 | #include
9 |
10 | #include
11 |
12 | BOOST_AUTO_TEST_CASE( defines)
13 | {
14 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
15 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
16 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_XML_LIB), true);
17 | }
18 |
19 | BOOST_AUTO_TEST_CASE( empty_engine)
20 | {
21 | QHelpEngine engine(QString());
22 | }
23 |
--------------------------------------------------------------------------------
/test/qt4/qttest.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2008-2011
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #include
7 |
8 | class QtTest: public QObject
9 | {
10 | /*!
11 | Test if the moc gets the #define
12 | */
13 | #if defined(TEST_MOCK)
14 | Q_OBJECT
15 | #endif
16 |
17 | private Q_SLOTS:
18 | void toUpper();
19 | };
20 |
21 | void
22 | QtTest::toUpper()
23 | {
24 | QString str = "Hello";
25 | QCOMPARE(str.toUpper(), QString("HELLO"));
26 | }
27 |
28 | QTEST_MAIN(QtTest)
29 | #include "qttest.moc"
30 |
31 |
--------------------------------------------------------------------------------
/test/qt5/qthelp.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2012
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtHelp
7 |
8 | #include
9 |
10 | #include
11 |
12 | BOOST_AUTO_TEST_CASE( defines)
13 | {
14 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
15 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
16 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_XML_LIB), true);
17 | }
18 |
19 | BOOST_AUTO_TEST_CASE( empty_engine)
20 | {
21 | QHelpEngine engine(QString());
22 | }
23 |
--------------------------------------------------------------------------------
/test/qt5/qt3drender.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2015
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE Qt3DRender
7 | #include
8 |
9 | #include
10 |
11 | BOOST_AUTO_TEST_CASE (defines)
12 | {
13 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_3DCORE_LIB), true);
14 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_3DRENDER_LIB), true);
15 | }
16 |
17 | BOOST_AUTO_TEST_CASE ( sample_code )
18 | {
19 | Qt3DCore::QEntity rootEntity;
20 | Qt3DRender::QMaterial material(&rootEntity);
21 | }
22 |
--------------------------------------------------------------------------------
/test/build_no.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright (C) Vladimir Prus 2006.
4 | # Distributed under the Boost Software License, Version 1.0. (See
5 | # accompanying file LICENSE.txt or copy at
6 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
7 |
8 | # Tests that no property prevents a target from being built.
9 |
10 | import BoostBuild
11 |
12 | t = BoostBuild.Tester(use_test_config=False)
13 |
14 | t.write("jamroot.jam", "exe hello : hello.cpp : debug:no ;")
15 | t.write("hello.cpp", "int main() {}\n")
16 |
17 | t.run_build_system()
18 | t.expect_nothing_more()
19 |
20 | t.run_build_system(["release"])
21 | t.expect_addition("bin/$toolset/release*/hello.exe")
22 |
23 | t.cleanup()
24 |
--------------------------------------------------------------------------------
/src/tools/features/coverage-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2019 Rene Rivera
2 | # Copyright 2019 Hans Dembinski
3 | # Distributed under the Boost Software License, Version 1.0.
4 | # (See accompanying file LICENSE.txt or copy at
5 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | import feature ;
8 |
9 | #| tag::doc[]
10 |
11 | [[b2.builtin.features.coverage]]`coverage`::
12 | *Allowed values:* `off`, `on`.
13 | +
14 | Enables code instrumentation to generate coverage data during execution.
15 |
16 | |# # end::doc[]
17 |
18 | feature.feature coverage
19 | :
20 | off # Disable coverage generation for the tool (default).
21 | on # Enable coverage generation for the tool.
22 | : propagated ;
23 |
--------------------------------------------------------------------------------
/src/engine/frames.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2001-2004 David Abrahams.
3 | * Distributed under the Boost Software License, Version 1.0.
4 | * (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
5 | */
6 |
7 | #include "jam.h"
8 | #include "frames.h"
9 |
10 |
11 | FRAME * frame_before_python_call;
12 |
13 |
14 | void frame_init( FRAME * frame )
15 | {
16 | frame->prev = 0;
17 | frame->prev_user = 0;
18 | lol_init( frame->args );
19 | frame->module = b2::ensure_valid(root_module());
20 | frame->rulename = "module scope";
21 | frame->file = 0;
22 | frame->line = -1;
23 | }
24 |
25 |
26 | void frame_free( FRAME * frame )
27 | {
28 | lol_free( frame->args );
29 | }
30 |
--------------------------------------------------------------------------------
/test/qt5/qtserialport.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2016
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtSerialPort
7 |
8 | #include
9 |
10 | #include
11 |
12 | BOOST_AUTO_TEST_CASE (defines)
13 | {
14 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
15 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_SERIALPORT_LIB), true);
16 | }
17 |
18 | BOOST_AUTO_TEST_CASE( serialport )
19 | {
20 | QSerialPort serialPort;
21 | serialPort.setPortName(QStringLiteral("test serialport"));
22 | }
23 |
--------------------------------------------------------------------------------
/example/asciidoctor/example_manpage.adoc:
--------------------------------------------------------------------------------
1 | = b2(1)
2 | Rene Rivera
3 | v0.0.0
4 | :doctype: manpage
5 | :manmanual: B2
6 | :mansource: B2
7 | :man-linkstyle: pass:[blue R < >]
8 |
9 | == NAME
10 |
11 | b2 - Boost Build
12 |
13 | == SYNOPSIS
14 |
15 | *b2* ['OPTION']... 'TARGET'...
16 |
17 | == OPTIONS
18 |
19 | *-n*::
20 | Print out what would get built.
21 |
22 | == EXIT STATUS
23 |
24 | *0*::
25 | Success.
26 |
27 | *1*::
28 | Failure.
29 |
30 | == RESOURCES
31 |
32 | *Project web site:* http://boost.org
33 |
34 | == COPYING
35 |
36 | Copyright \(C) 2017 {author}. +
37 | Distributed under the Boost Software License, Version 1.0.
38 | (See accompanying file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
--------------------------------------------------------------------------------
/example/gettext/russian.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3 | # This file is distributed under the same license as the PACKAGE package.
4 | # FIRST AUTHOR , YEAR.
5 | #
6 | #, fuzzy
7 | msgid ""
8 | msgstr ""
9 | "Project-Id-Version: PACKAGE VERSION\n"
10 | "Report-Msgid-Bugs-To: \n"
11 | "POT-Creation-Date: 2003-07-01 15:45+0400\n"
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 | "Last-Translator: FULL NAME \n"
14 | "Language-Team: LANGUAGE \n"
15 | "MIME-Version: 1.0\n"
16 | "Content-Type: text/plain; charset=CHARSET\n"
17 | "Content-Transfer-Encoding: 8bit\n"
18 |
19 | #: main.cpp:16
20 | msgid "hello"
21 | msgstr "international hello"
22 |
--------------------------------------------------------------------------------
/test/qt5/qtwebkit.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2012
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtWebKit
7 |
8 | #include
9 |
10 | #include
11 |
12 | BOOST_AUTO_TEST_CASE( defines)
13 | {
14 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
15 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
16 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WEBKIT_LIB), true);
17 | }
18 |
19 | BOOST_AUTO_TEST_CASE( webkit )
20 | {
21 | BOOST_CHECK(QWebSettings::globalSettings());
22 | }
23 |
--------------------------------------------------------------------------------
/test/toolset-mock/src/libtool.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | #
3 | # Copyright 2017 Steven Watanabe
4 | #
5 | # Distributed under the Boost Software License, Version 1.0.
6 | # (See accompanying file LICENSE.txt or copy at
7 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
8 |
9 | from MockProgram import *
10 |
11 | command('libtool', '-static', '-o', output_file('bin/darwin-4.2.1/debug/link-static/target-os-darwin/libl1.a'), input_file('bin/darwin-4.2.1/debug/link-static/target-os-darwin/lib.o'))
12 | command('libtool', '-static', '-o', output_file('bin/darwin-4.2.1/debug/link-static/runtime-link-static/target-os-darwin/libl1.a'), input_file('bin/darwin-4.2.1/debug/link-static/runtime-link-static/target-os-darwin/lib.o'))
13 |
14 | main()
15 |
--------------------------------------------------------------------------------
/test/toolset_intel_darwin.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | #
3 | # Copyright 2017 Steven Watanabe
4 | #
5 | # Distributed under the Boost Software License, Version 1.0.
6 | # (See accompanying file LICENSE.txt or copy at
7 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
8 |
9 | # validates the intel-darwin toolset using a mock of icc
10 |
11 | from TestToolset import test_toolset
12 |
13 | test_toolset("intel-darwin", "10.2", [
14 | ["target-os=darwin"],
15 | ["target-os=darwin", "release", "strip=on"],
16 | ["target-os=darwin", "threading=multi"],
17 | ["target-os=darwin", "link=static"],
18 | ["target-os=darwin", "link=static", "runtime-link=static"],
19 | ["target-os=darwin", "architecture=x86", "address-model=32"]])
20 |
--------------------------------------------------------------------------------
/test/qt5/qt3dcore.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2015
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE Qt3DCore
7 | #include
8 |
9 | #include
10 |
11 | BOOST_AUTO_TEST_CASE (defines)
12 | {
13 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_3DCORE_LIB), true);
14 | }
15 |
16 | BOOST_AUTO_TEST_CASE ( sample_code )
17 | {
18 | Qt3DCore::QTransform torusTransform;
19 | torusTransform.setScale3D(QVector3D(1.5, 1, 0.5));
20 | torusTransform.setRotation(QQuaternion::fromAxisAndAngle(QVector3D(1, 0, 0), 45.0f));
21 | }
22 |
--------------------------------------------------------------------------------
/test/qt5/qt3dinput.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2015
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE Qt3DInput
7 | #include
8 |
9 | #include
10 |
11 | BOOST_AUTO_TEST_CASE (defines)
12 | {
13 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_3DINPUT_LIB), true);
14 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_3DCORE_LIB), true);
15 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_3DRENDER_LIB), true);
16 | }
17 |
18 |
19 | BOOST_AUTO_TEST_CASE ( sample_code )
20 | {
21 | Qt3DCore::QEntity rootEntity;
22 |
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/test/qt5/qtserialbus.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2016
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtSerialBus
7 |
8 | #include
9 |
10 | #include
11 |
12 | BOOST_AUTO_TEST_CASE( defines)
13 | {
14 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
15 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_SERIALBUS_LIB), true);
16 | }
17 |
18 | /*!
19 | create a canbus instance
20 | */
21 | BOOST_AUTO_TEST_CASE( serialBus )
22 | {
23 | auto canbus = QCanBus::instance();
24 | Q_UNUSED(canbus);
25 | }
26 |
--------------------------------------------------------------------------------
/example/gettext/readme.txt:
--------------------------------------------------------------------------------
1 | Copyright 2003 Vladimir Prus
2 | Distributed under the Boost Software License, Version 1.0.
3 | (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
4 |
5 |
6 | This example shows how it is possible to use GNU gettext utilities with
7 | B2.
8 |
9 | A simple translation file is compiled and installed as message catalog for
10 | russian. The main application explicitly switches to russian locale and outputs
11 | the translation of "hello".
12 |
13 | To test:
14 |
15 | bjam
16 | bin/gcc/debug/main
17 |
18 | To test even more:
19 |
20 | - add more localized strings to "main.cpp"
21 | - run "bjam update-russian"
22 | - edit "russian.po"
23 | - run bjam
24 | - run "main"
25 |
--------------------------------------------------------------------------------
/src/tools/features/build-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.build]]`build`::
11 | *Allowed values:* `no`
12 | +
13 | Used to conditionally disable build of a target. If `no` is in
14 | properties when building a target, build of that target is skipped. Combined
15 | with conditional requirements this allows you to skip building some target in
16 | configurations where the build is known to fail.
17 |
18 | |# # end::doc[]
19 |
20 | feature.feature build
21 | : yes no
22 | : optional ;
23 |
--------------------------------------------------------------------------------
/test/builtin_echo.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright 2012 Steven Watanabe
4 | # Distributed under the Boost Software License, Version 1.0.
5 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | # This tests the ECHO rule.
8 |
9 | import BoostBuild
10 |
11 | def test_echo(name):
12 | t = BoostBuild.Tester(["-ffile.jam"], pass_toolset=0)
13 |
14 | t.write("file.jam", """\
15 | %s ;
16 | UPDATE ;
17 | """ % name)
18 | t.run_build_system(stdout="\n")
19 |
20 | t.write("file.jam", """\
21 | %s a message ;
22 | UPDATE ;
23 | """ % name)
24 | t.run_build_system(stdout="a message\n")
25 |
26 | t.cleanup()
27 |
28 | test_echo("ECHO")
29 | test_echo("Echo")
30 | test_echo("echo")
31 |
--------------------------------------------------------------------------------
/test/core_scanner.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright 2018 Steven Watanabe
4 | # Distributed under the Boost Software License, Version 1.0.
5 | # (See accompanying file LICENSE.txt or copy at
6 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
7 |
8 | # Tests the parsing of tokens
9 |
10 | import BoostBuild
11 |
12 | t = BoostBuild.Tester(pass_toolset=0)
13 |
14 | t.write("file.jam", """\
15 | rule test1 ( args * )
16 | {
17 | EXIT $(args) : 0 ;
18 | }
19 |
20 | test1
21 | a # a comment
22 | # another comment
23 | b
24 | c #| a multiline comment |# d
25 | #| another
26 | multiline
27 | comment
28 | |#
29 | e "#f" ;
30 | """)
31 |
32 | t.run_build_system(["-ffile.jam"], stdout="""\
33 | a b c d e #f
34 | """)
35 |
36 | t.cleanup()
37 |
--------------------------------------------------------------------------------
/test/lang_objc.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright Nikita Kniazev 2021.
4 | # Distributed under the Boost Software License, Version 1.0. (See
5 | # accompanying file LICENSE.txt or copy at
6 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
7 |
8 | import BoostBuild
9 |
10 | t = BoostBuild.Tester()
11 |
12 | t.write("jamroot.jam", """
13 | obj a : hello.m ;
14 | obj b : hello.mm ;
15 | """)
16 |
17 | t.write("hello.m", '''\
18 | @interface Foo
19 | @end
20 | ''')
21 | t.write("hello.mm", '''\
22 | @interface Foo
23 | @end
24 |
25 | class Bar {};
26 | ''')
27 |
28 | t.run_build_system()
29 | t.expect_addition("bin/$toolset/debug*/a.obj")
30 | t.expect_addition("bin/$toolset/debug*/b.obj")
31 | t.expect_nothing_more()
32 |
33 | t.cleanup()
34 |
--------------------------------------------------------------------------------
/src/tools/features/name-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.name]]`name`::
11 | When used in requirements of a prebuilt library target this feature specifies
12 | the name of the library (the name of the library file without any
13 | platform-specific suffixes or prefixes). See <> for examples.
14 | +
15 | When used in requirements of an `` target it specifies the name of the
16 | target file.
17 |
18 | |# # end::doc[]
19 |
20 | feature.feature name
21 | :
22 | : free ;
23 |
--------------------------------------------------------------------------------
/src/tools/features/strip-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.strip]]`strip`::
11 | *Allowed values:* `off`, `on`.
12 | +
13 | Controls whether the binary should be stripped -- that is have everything not
14 | necessary to running removed.
15 | +
16 | NOTE: This feature will show up in target paths of everything, not just
17 | binaries.
18 |
19 | |# # end::doc[]
20 |
21 | # TODO: Should fix that when implementing feature relevance.
22 |
23 | feature.feature strip
24 | : off on
25 | : propagated ;
26 |
--------------------------------------------------------------------------------
/test/test-config-example.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2004, 2005, 2006 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 |
6 | # Skeleton for test configuration. If your local configuration
7 | # interferes with testing, rename this file to 'test-config.jam'
8 | # and tweak it. When tests are run, only this file will be loaded,
9 | # while site-config.jam and user-config.jam will be ignored.
10 |
11 | using gcc ;
12 |
13 | using boostbook
14 | : /home/ghost/Store/docbook/xsl
15 | : /home/ghost/Store/docbook/dtd
16 | : /home/ghost/Work/Boost/boost-svn/tools/boostbook
17 | ;
18 | using doxygen ;
19 | using qt4 : /usr/share/qt4 ;
20 |
--------------------------------------------------------------------------------
/.ci/azp-linux-extra.yml:
--------------------------------------------------------------------------------
1 | steps:
2 | - bash: |
3 | set -e
4 | uname -a
5 | ./.ci/linux-cxx-install.sh
6 | displayName: Install
7 | - bash: |
8 | set -e
9 | ./bootstrap.sh ${TOOLSET}
10 | ./b2 --prefix=$HOME/temp/.b2 install toolset=${TOOLSET}
11 | rm ./b2
12 | export PATH=$HOME/temp/.b2/bin:$PATH
13 | cd $HOME
14 | touch build.jam
15 | b2 -v
16 | b2 -n --debug-configuration toolset=${TOOLSET}
17 | displayName: Bootstrap
18 | - { bash: "./.ci/b2_example.sh example/hello", displayName: "example/hello" }
19 | - { bash: "./.ci/b2_example.sh example/libraries", displayName: "example/libraries" }
20 | - { bash: "./.ci/b2_example.sh example/make", displayName: "example/make" }
21 |
--------------------------------------------------------------------------------
/test/boostbook.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright 2004, 2006 Vladimir Prus
4 | # Distributed under the Boost Software License, Version 1.0.
5 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | import BoostBuild
8 | import string
9 |
10 | t = BoostBuild.Tester()
11 |
12 | t.set_tree("boostbook")
13 |
14 | # For some reason, the messages are sent to stderr.
15 | t.run_build_system()
16 | t.fail_test(t.stdout().find("""Writing boost/A.html for refentry(boost.A)
17 | Writing library/reference.html for section(library.reference)
18 | Writing index.html for chapter(library)
19 | Writing docs_HTML.manifest
20 | """) == -1)
21 | t.expect_addition(["html/boost/A.html", "html/index.html"])
22 |
23 | t.cleanup()
24 |
--------------------------------------------------------------------------------
/test/qt4/mock.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2011
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtMoc
7 |
8 | #include "mock.h"
9 |
10 | #include
11 |
12 | Mock::Mock()
13 | {
14 | }
15 |
16 | /*!
17 | Check that the compiler get the correct #defines.
18 | The logic to test the moc is in the header file "mock.h"
19 | */
20 | BOOST_AUTO_TEST_CASE(construct_mock)
21 | {
22 | delete new Mock();
23 |
24 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
25 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(TEST_MOCK), true);
26 | }
27 |
--------------------------------------------------------------------------------
/test/qt5/mock.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2012
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtMoc
7 |
8 | #include "mock.h"
9 |
10 | #include
11 |
12 | Mock::Mock()
13 | {
14 | }
15 |
16 | /*!
17 | Check that the compiler get the correct #defines.
18 | The logic to test the moc is in the header file "mock.h"
19 | */
20 | BOOST_AUTO_TEST_CASE(construct_mock)
21 | {
22 | delete new Mock();
23 |
24 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
25 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(TEST_MOCK), true);
26 | }
27 |
--------------------------------------------------------------------------------
/example/gettext/main.cpp:
--------------------------------------------------------------------------------
1 | // Copyright Vladimir Prus 2003.
2 | // Distributed under the Boost Software License, Version 1.0.
3 | // (See accompanying file LICENSE.txt
4 | // or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 |
7 | #include
8 | #include
9 | #define i18n(s) gettext(s)
10 |
11 | #include
12 | using namespace std;
13 |
14 | int main()
15 | {
16 | // Specify that translations are stored in directory
17 | // "messages".
18 | bindtextdomain("main", "messages");
19 | textdomain("main");
20 |
21 | // Switch to russian locale.
22 | setlocale(LC_MESSAGES, "ru_RU.KOI8-R");
23 |
24 | // Output localized message.
25 | std::cout << i18n("hello") << "\n";
26 |
27 | return 0;
28 | }
29 |
--------------------------------------------------------------------------------
/test/assert.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright 2023 Nikita Kniazev
4 | # Distributed under the Boost Software License, Version 1.0.
5 | # (See accompanying file LICENSE.txt or copy at
6 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
7 |
8 | # Tests assert module
9 |
10 | import BoostBuild
11 |
12 | t = BoostBuild.Tester(pass_toolset=False)
13 |
14 | t.write("Jamroot", """\
15 | import assert ;
16 |
17 | rule foo ( ) { return 1 2 3 ; }
18 |
19 | assert.result 1 2 4 : foo ;
20 | """)
21 |
22 | t.run_build_system(status=1, stdout="""\
23 | error: assertion failure: [ foo ]
24 | error: Expected: [ "1" "2" "4" ]
25 | error: Got: [ "1" "2" "3" ]
26 | """, match_filter=lambda x: "from module" not in x)
27 | t.expect_nothing_more()
28 |
29 | t.cleanup()
30 |
--------------------------------------------------------------------------------
/test/test2.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright 2002, 2003 Dave Abrahams
4 | # Copyright 2002, 2003 Vladimir Prus
5 | # Distributed under the Boost Software License, Version 1.0.
6 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
7 |
8 | import BoostBuild
9 |
10 | t = BoostBuild.Tester()
11 |
12 | t.set_tree("test2")
13 |
14 | file_list = 'bin/$toolset/debug*/' * \
15 | BoostBuild.List("foo.exe foo.obj")
16 |
17 | t.run_build_system(["-sBOOST_BUILD_PATH=" + t.original_workdir + "/.."])
18 | t.expect_addition(file_list)
19 |
20 |
21 | t.write("foo.cpp", "int main() {}\n")
22 | t.run_build_system(["-d2", "-sBOOST_BUILD_PATH=" + t.original_workdir + "/.."])
23 | t.expect_touch(file_list)
24 |
25 | t.cleanup()
26 |
--------------------------------------------------------------------------------
/example/pch/jamroot.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2006 Ilya Sokolov
2 | #
3 | # Distributed under the Boost Software License, Version 1.0. (See
4 | # accompanying file LICENSE.txt or copy at
5 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | # pch ##########################################################################
8 |
9 | import pch ;
10 |
11 | cpp-pch pch
12 | : # sources
13 | include/pch.hpp
14 | : # requirements
15 | include
16 | ;
17 | explicit pch ;
18 |
19 | # exe ##########################################################################
20 |
21 | exe hello_world
22 | : # sources
23 | pch
24 | source/hello_world.cpp
25 | : # requirements
26 | include
27 | : # default build
28 | : # usage requirements
29 | ;
30 |
--------------------------------------------------------------------------------
/test/qt5/qtpositioning.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2012
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtPositioning
7 |
8 | #include
9 |
10 | #include
11 |
12 | BOOST_AUTO_TEST_CASE (defines)
13 | {
14 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
15 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_POSITIONING_LIB), true);
16 | }
17 |
18 | BOOST_AUTO_TEST_CASE( geo_coordinate )
19 | {
20 | QGeoCoordinate geocoordinate;
21 |
22 | BOOST_CHECK_EQUAL(geocoordinate.type(), QGeoCoordinate::InvalidCoordinate);
23 | }
24 |
--------------------------------------------------------------------------------
/test/qt5/qtwebsockets.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2016
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtWebSockets
7 |
8 | #include
9 |
10 | #include
11 |
12 | BOOST_AUTO_TEST_CASE (defines)
13 | {
14 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
15 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WEBSOCKETS_LIB), true);
16 | }
17 |
18 | BOOST_AUTO_TEST_CASE( websocket )
19 | {
20 | QWebSocket socket;
21 | socket.setPauseMode(QAbstractSocket::PauseNever);
22 |
23 | BOOST_TEST(socket.isValid() == false);
24 | }
25 |
--------------------------------------------------------------------------------
/test/qt5/qtwebkitwidgets.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2012
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtWebKitWidgets
7 |
8 | #include
9 |
10 | #include
11 |
12 | BOOST_AUTO_TEST_CASE( defines)
13 | {
14 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
15 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
16 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WEBKITWIDGETS_LIB), true);
17 | }
18 |
19 | BOOST_AUTO_TEST_CASE( webkit )
20 | {
21 | QWebPage page;
22 | BOOST_CHECK_EQUAL(page.isModified(), false);
23 | }
24 |
--------------------------------------------------------------------------------
/test/qt4/qtwebkit.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2008
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtWebKit
7 |
8 | #include
9 | #include
10 |
11 | #include
12 |
13 | BOOST_AUTO_TEST_CASE( defines)
14 | {
15 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
16 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
17 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WEBKIT_LIB), true);
18 | }
19 |
20 | BOOST_AUTO_TEST_CASE( webkit )
21 | {
22 | QWebPage page;
23 | BOOST_CHECK_EQUAL(page.isModified(), false);
24 | }
25 |
--------------------------------------------------------------------------------
/test/qt5/qtnfc.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2016
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtNfc
7 |
8 | #include
9 |
10 | #include
11 |
12 | BOOST_AUTO_TEST_CASE( defines)
13 | {
14 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
15 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_NFC_LIB), true);
16 | }
17 |
18 | /*!
19 | Try to detect a device
20 | */
21 | BOOST_AUTO_TEST_CASE( nfc )
22 | {
23 | QNearFieldManager manager;
24 | if (!manager.isAvailable())
25 | {
26 | BOOST_TEST_MESSAGE("No Nfc");
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/test/toolset_darwin.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | #
3 | # Copyright 2017 Steven Watanabe
4 | #
5 | # Distributed under the Boost Software License, Version 1.0.
6 | # (See accompanying file LICENSE.txt or copy at
7 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
8 |
9 | # validates the darwin toolset using a mock of gcc
10 |
11 | from TestToolset import test_toolset
12 |
13 | test_toolset("darwin", "4.2.1", [
14 | ["target-os=darwin"],
15 | ["target-os=darwin", "release", "strip=on"],
16 | ["target-os=darwin", "threading=multi"],
17 | ["target-os=darwin", "link=static"],
18 | ["target-os=darwin", "link=static", "runtime-link=static"],
19 | # Address-model handling is quite broken
20 | # ["target-os=darwin", "architecture=x86", "address-model=32"]
21 | ])
22 |
--------------------------------------------------------------------------------
/test/install_build_no.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright 2021 Dmitry Arkhipov (grisumbras@gmail.com)
4 | # Distributed under the Boost Software License, Version 1.0.
5 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | # Check that no in usage-requirements of dependencies does not affect
8 | # install rule, i.e. a skipped installed target does not affect insallation of
9 | # other targets.
10 |
11 | import BoostBuild
12 |
13 | t = BoostBuild.Tester()
14 |
15 | t.write("a.cpp", "int main() {}\n")
16 |
17 | t.write("jamroot.jam", """
18 | make x : : maker : no ;
19 | exe a : a.cpp ;
20 | install install : x a ;
21 | """)
22 |
23 | t.run_build_system()
24 | t.expect_addition("install/a.exe")
25 |
26 | t.cleanup()
27 |
--------------------------------------------------------------------------------
/test/transitive_skip.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright 2021 Dmitry Arkhipov (grisumbras@gmail.com)
4 | # Distributed under the Boost Software License, Version 1.0.
5 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | # Regression test: it was possible that due to evaluation of conditional
8 | # requirements, two different values of non-free features were present in a
9 | # property set.
10 |
11 | import BoostBuild
12 |
13 | t = BoostBuild.Tester()
14 |
15 | t.write("a.cpp", "")
16 |
17 | t.write("jamroot.jam", """
18 | alias dep : : no ;
19 | make a : dep : maker ;
20 |
21 | actions maker
22 | {
23 | this-command-is-unlikely-to-succeed ;
24 | }
25 |
26 | """)
27 |
28 | t.run_build_system()
29 |
30 | t.cleanup()
31 |
--------------------------------------------------------------------------------
/test/ordered_properties.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright 2004 Vladimir Prus
4 | # Distributed under the Boost Software License, Version 1.0.
5 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | # This checks that B2 does not reorder properties
8 | # lexicographically.
9 |
10 | import BoostBuild
11 |
12 | t = BoostBuild.Tester()
13 |
14 | t.write("a.cpp", """
15 | #include
16 | int main() { foo(); }
17 | """)
18 |
19 | t.write("jamroot.jam", """
20 | exe a : a.cpp : d2 d1 ;
21 | """)
22 |
23 | t.write("d1/a.h", """
24 | """)
25 |
26 | t.write("d2/a.h", """
27 | inline void foo() {}
28 | """)
29 |
30 | t.run_build_system()
31 | t.expect_addition("bin/$toolset/debug*/a.exe")
32 |
33 | t.cleanup()
34 |
--------------------------------------------------------------------------------
/test/qt4/phonon.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2008
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtPhonon
7 |
8 | #include
9 |
10 | #include
11 |
12 | BOOST_AUTO_TEST_CASE( defines)
13 | {
14 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
15 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
16 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_XML_LIB), true);
17 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_PHONON_LIB), true);
18 | }
19 |
20 | BOOST_AUTO_TEST_CASE( phonon_object)
21 | {
22 | Phonon::MediaObject player;
23 | }
24 |
--------------------------------------------------------------------------------
/example/qt/qt4/hello/arrow.h:
--------------------------------------------------------------------------------
1 | // Copyright Vladimir Prus 2005.
2 | // Distributed under the Boost Software License, Version 1.0.
3 | // (See accompanying file LICENSE.txt
4 | // or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #include
7 |
8 | #include
9 | #include
10 | #include
11 |
12 | #include
13 | #include
14 |
15 | class Arrow_widget : public QWidget
16 | {
17 | Q_OBJECT
18 | public:
19 | Arrow_widget(QWidget* parent = 0);
20 |
21 | public slots:
22 | void slotChangeColor();
23 |
24 | private:
25 | void draw_arrow(int x1, int y1, int x2, int y2, QPainter& painter);
26 | void paintEvent(QPaintEvent*);
27 |
28 | private:
29 | int color_;
30 | };
31 |
--------------------------------------------------------------------------------
/doc/src/fragments.adoc:
--------------------------------------------------------------------------------
1 | [[root_option]]
2 |
3 | root
4 |
5 | Specifies root directory of the compiler installation. This option is
6 | necessary only if it is not possible to detect this information from the
7 | compiler command—for example if the specified compiler command is a user
8 | script.
9 |
10 | [[common_options]]
11 |
12 | cflags
13 |
14 | Specifies additional compiler flags that will be used when compiling C
15 | sources.
16 |
17 | cxxflags
18 |
19 | Specifies additional compiler flags that will be used when compiling {CPP}
20 | sources.
21 |
22 | compileflags
23 |
24 | Specifies additional compiler flags that will be used when compiling
25 | both C and {CPP} sources.
26 |
27 | linkflags
28 |
29 | Specifies additional command line options that will be passed to the
30 | linker.
31 |
--------------------------------------------------------------------------------
/doc/src/howto.adoc:
--------------------------------------------------------------------------------
1 | Want to learn about B2 features? Start with the
2 | link:#b2.tutorial[tutorial] and continue with the link:#b2.overview[overview].
3 | When you're ready to try B2 in practice, go to the
4 | link:#b2.installation[installation].
5 |
6 | Building a project with B2? See the link:#b2.installation[installation]
7 | and then read the link:#b2.overview.invocation[overview].
8 |
9 | Setting up B2 on your project? Take a look at the
10 | link:#b2.overview[overview] and link:#b2.extender[extender manual].
11 |
12 | If there's anything you find unclear in this documentation, report the
13 | problem directly in the https://github.com/bfgroup/b2/issues[issue
14 | tracker]. For more general questions, please post them to our discussion
15 | forums (https://github.com/bfgroup/b2/discussions[]).
16 |
--------------------------------------------------------------------------------
/src/tools/types/objc.jam:
--------------------------------------------------------------------------------
1 | # Copyright Rene Rivera 2008, 2010.
2 | # Distributed under the Boost Software License, Version 1.0. (See accompanying
3 | # file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
4 | import type ;
5 | import scanner ;
6 | import types/cpp ;
7 |
8 | class objc-scanner : c-scanner
9 | {
10 | rule __init__ ( includes * )
11 | {
12 | c-scanner.__init__ $(includes) ;
13 | }
14 |
15 | rule pattern ( )
16 | {
17 | return "^[ \t]*#[ \t]*(include|import)[ \t]*(<[^<]+>|\"[^\"]+\")" ;
18 | }
19 | }
20 |
21 | scanner.register objc-scanner : include ;
22 |
23 | type.register OBJECTIVE_C : m ;
24 | type.register OBJECTIVE_CPP : mm ;
25 | type.set-scanner OBJECTIVE_C : objc-scanner ;
26 | type.set-scanner OBJECTIVE_CPP : objc-scanner ;
27 |
--------------------------------------------------------------------------------
/bootstrap.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # Copyright (C) 2005, 2006 Douglas Gregor.
3 | # Copyright (C) 2006 The Trustees of Indiana University
4 | # Copyright (C) 2010 Bryce Lelbach
5 | # Copyright 2018-2020 Rene Rivera
6 | #
7 | # Distributed under the Boost Software License, Version 1.0.
8 | # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
9 |
10 | # Build b2
11 | echo "Building the B2 engine.."
12 | pwd=`pwd`
13 | "${pwd}/src/engine/build.sh" "$@"
14 | if [ $? -ne 0 ]; then
15 | echo
16 | echo "Failed to build the B2 engine." 1>&2
17 | exit 1
18 | fi
19 | cd "$pwd"
20 | cp "./src/engine/b2" . 2>/dev/null
21 | cp "./src/engine/b2.exe" . 2>/dev/null
22 |
23 | cat << EOF
24 |
25 | Building is done. To install, run:
26 |
27 | ./b2 install --prefix=
28 |
29 | EOF
30 |
--------------------------------------------------------------------------------
/test/Jamfile.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2018 Steven Watanabe
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import python ;
7 | import testing ;
8 |
9 | if ! [ python.configured ]
10 | {
11 | using python ;
12 | }
13 |
14 | # Not quite perfect, but good enough for most purposes
15 | local test-files = [ glob *.py ] ;
16 |
17 | local boost-build-files = [ glob
18 | ../src/tools/*.jam
19 | ../src/tools/*/*.jam
20 | ../src/build/*.jam
21 | ../src/util/*.jam
22 | ../src/kernel/*.jam
23 | ../src/options/*.jam
24 | ../src/*.jam ] ;
25 |
26 | testing.make-test run-pyd : test_all.py :
27 | $(test-files)
28 | $(boost-build-files)
29 | ;
30 |
--------------------------------------------------------------------------------
/test/example_qt4.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright (C) Vladimir Prus 2006.
4 | # Distributed under the Boost Software License, Version 1.0. (See
5 | # accompanying file LICENSE.txt or copy at
6 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
7 |
8 | # Test the 'qt4' examples.
9 |
10 | import BoostBuild
11 |
12 | t = BoostBuild.Tester()
13 |
14 | t.set_tree("../example/qt/qt4/hello")
15 | t.run_build_system()
16 | t.expect_addition(["bin/$toolset/debug*/threading-multi/arrow"])
17 |
18 | t.set_tree("../example/qt/qt4/moccable-cpp")
19 | t.run_build_system()
20 | t.expect_addition(["bin/$toolset/debug*/threading-multi/main"])
21 |
22 | t.set_tree("../example/qt/qt4/uic")
23 | t.run_build_system()
24 | t.expect_addition(["bin/$toolset/debug*/threading-multi/hello"])
25 |
26 | t.cleanup()
27 |
--------------------------------------------------------------------------------
/test/toolset_clang_darwin.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | #
3 | # Copyright 2017 Steven Watanabe
4 | #
5 | # Distributed under the Boost Software License, Version 1.0.
6 | # (See accompanying file LICENSE.txt or copy at
7 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
8 |
9 | # validates the clang-darwin toolset using a mock of clang
10 |
11 | from TestToolset import test_toolset
12 |
13 | test_toolset("clang-darwin", "3.9.0", [
14 | ["target-os=darwin"],
15 | ["target-os=darwin", "release", "strip=on", "linkflags=-v"],
16 | ["target-os=darwin", "threading=multi"],
17 | ["target-os=darwin", "link=static"],
18 | ["target-os=darwin", "link=static", "runtime-link=static"],
19 | ["target-os=darwin", "architecture=x86", "address-model=32"],
20 | ["target-os=darwin", "cxxstd=latest"]])
21 |
--------------------------------------------------------------------------------
/test/example_gettext.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright (C) Vladimir Prus 2006.
4 | # Distributed under the Boost Software License, Version 1.0. (See
5 | # accompanying file LICENSE.txt or copy at
6 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
7 |
8 | # Test the 'gettext' example.
9 |
10 | import BoostBuild
11 | import os
12 | import string
13 |
14 | t = BoostBuild.Tester()
15 |
16 | t.set_tree("../example/gettext")
17 |
18 | t.run_build_system(stderr=None)
19 |
20 | t.expect_addition(["bin/$toolset/debug*/main.exe",
21 | "bin/$toolset/debug*/russian.mo"])
22 |
23 | file = t.adjust_names(["bin/$toolset/debug*/main.exe"])[0]
24 |
25 | input_fd = os.popen(file)
26 | input = input_fd.read();
27 |
28 | t.fail_test(input.find("international hello") != 0)
29 |
30 | t.cleanup()
31 |
--------------------------------------------------------------------------------
/src/tools/features/cflags-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.cflags]]`cflags`; `cxxflags`; `linkflags`::
11 | The value of these features is passed without modification to the corresponding
12 | tools. For `cflags` that is both the C and {CPP} compilers, for `cxxflags` that
13 | is the {CPP} compiler, and for `linkflags` that is the linker. The features are
14 | handy when you are trying to do something special that cannot be achieved by a
15 | higher-level feature in B2.
16 |
17 | |# # end::doc[]
18 |
19 | feature.feature cflags
20 | :
21 | : free optional ;
22 |
--------------------------------------------------------------------------------
/test/skipping.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright 2003 Vladimir Prus
4 | # Distributed under the Boost Software License, Version 1.0.
5 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | # Test that V2 does not fail gracelessy when any target is skipped.
8 |
9 | import BoostBuild
10 |
11 | # Create a temporary working directory.
12 | t = BoostBuild.Tester(use_test_config=False)
13 |
14 | t.write("a.cpp", "int main() {}\n")
15 | t.write("b.cpp", "int main() {}\n")
16 | t.write("c.cpp", "int main() {}\n")
17 | t.write("jamroot.jam", """\
18 | import feature ;
19 | feature.feature foo : 1 2 : link-incompatible ;
20 | exe a : a.cpp : 1 ;
21 | exe b : b.cpp : 2 ;
22 | exe c : c.cpp ;
23 | """)
24 |
25 | t.run_build_system(["foo=1"])
26 |
27 | t.cleanup()
28 |
--------------------------------------------------------------------------------
/example/qt/qt3/hello/canvas.h:
--------------------------------------------------------------------------------
1 | // Copyright Vladimir Prus 2004.
2 | // Distributed under the Boost Software License, Version 1.0.
3 | // (See accompanying file LICENSE.txt
4 | // or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 |
7 | #ifndef CANVAS_VP_2004_08_31
8 | #define CANVAS_VP_2004_08_31
9 |
10 | #include
11 | #include
12 | #include
13 |
14 | class Canvas : public QWidget
15 | {
16 | Q_OBJECT
17 | public:
18 | Canvas(QWidget* parent);
19 |
20 | virtual ~Canvas();
21 |
22 | public slots:
23 | void change_color();
24 |
25 | private:
26 | void redraw();
27 | class QCanvas* m_canvas;
28 | class QCanvasView* m_canvas_view;
29 | class QPen m_pen;
30 | class QBrush* m_brushes;
31 | int m_current_brush;
32 | };
33 |
34 | #endif
35 |
36 |
--------------------------------------------------------------------------------
/example/gettext/jamfile.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2003, 2006 Vladimir Prus
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
4 |
5 |
6 | # Declare a main target.
7 | exe main : main.cpp ;
8 |
9 | # Declare an action for updating translations
10 | # After changing main.cpp, invocation of
11 | #
12 | # bjam update-russian
13 | #
14 | # will update translations in russian.po
15 | gettext.update update-russian : russian.po main ;
16 |
17 | # Compiled message catalog.
18 | gettext.catalog russian : russian.po ;
19 |
20 | # A stage rule which installs message catalog to the
21 | # location gettext expects.
22 | stage messages-russian : russian
23 | : messages/ru_RU.KOI8-R/LC_MESSAGES
24 | main.mo
25 | ;
26 |
27 |
--------------------------------------------------------------------------------
/src/tools/features/library-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.library]]`library`::
11 | This feature is almost equivalent to the
12 | <`>> feature, except that it takes
13 | effect only for linking. When you want to link all targets in a Jamfile to
14 | certain library, the `` feature is preferred over `X` -- the
15 | latter will add the library to all targets, even those that have nothing to do
16 | with libraries.
17 |
18 | |# # end::doc[]
19 |
20 | feature.feature library
21 | :
22 | : free dependency incidental ;
23 |
--------------------------------------------------------------------------------
/src/tools/features/address-model-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.address-model]]`address-model`::
11 | *Allowed values:* `32`, `64`.
12 | +
13 | Specifies if 32-bit or 64-bit code should be generated by the compiler. Whether
14 | this feature works depends on the used compiler, its version, how the compiler
15 | is configured, and the values of the `architecture` `instruction-set` features.
16 | Please see the section <> for details.
17 |
18 | |# # end::doc[]
19 |
20 | feature.feature address-model
21 | : 16 32 64 32_64
22 | : propagated optional ;
23 |
--------------------------------------------------------------------------------
/test/core_d12.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright 2002, 2003 Vladimir Prus
4 | # Distributed under the Boost Software License, Version 1.0.
5 | # (See accompanying file LICENSE.txt or copy at
6 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
7 |
8 | # This tests correct handling of "-d1" and "-d2" options.
9 |
10 | import BoostBuild
11 |
12 | t = BoostBuild.Tester(["-ffile.jam"], pass_toolset=0)
13 |
14 | t.write("file.jam", """\
15 | actions a { }
16 | actions quietly b { }
17 | ALWAYS all ;
18 | a all ;
19 | b all ;
20 | """)
21 |
22 | t.run_build_system(["-d0"], stdout="")
23 |
24 | t.run_build_system(["-d1"])
25 | t.expect_output_lines("a all")
26 | t.expect_output_lines("b all", False)
27 |
28 | t.run_build_system(["-d2"])
29 | t.expect_output_lines("a all")
30 | t.expect_output_lines("b all")
31 |
32 | t.cleanup()
33 |
--------------------------------------------------------------------------------
/test/toolset_clang_vxworks.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | #
3 | # Copyright 2018 Steven Watanabe
4 | #
5 | # Distributed under the Boost Software License, Version 1.0.
6 | # (See accompanying file LICENSE.txt or copy at
7 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
8 |
9 | # validates the clang_vxworks toolset using a mock of clang
10 |
11 | from TestToolset import test_toolset
12 |
13 | test_toolset("clang-vxworks", "4.0.1", [
14 | ["target-os=vxworks"],
15 | ["target-os=vxworks", "release", "strip=on", "linkflags=-t"],
16 | ["target-os=vxworks", "threading=multi"],
17 | ["target-os=vxworks", "link=static"],
18 | ["target-os=vxworks", "link=static", "runtime-link=static"],
19 | ["target-os=vxworks", "architecture=x86", "address-model=32"],
20 | ["target-os=vxworks", "rtti=off", "exception-handling=off"]])
21 |
--------------------------------------------------------------------------------
/.ci/azp-macos-extra.yml:
--------------------------------------------------------------------------------
1 | steps:
2 | - bash: |
3 | set -e
4 | uname -a
5 | ls -laF /Applications
6 | sudo xcode-select -switch ${XCODE_APP}
7 | which clang++
8 | displayName: Install
9 | - bash: |
10 | set -e
11 | ./bootstrap.sh ${TOOLSET}
12 | ./b2 --prefix=$HOME/temp/.b2 install ${TOOLSET:+toolset=$TOOLSET}
13 | rm ./b2
14 | export PATH=$HOME/temp/.b2/bin:$PATH
15 | cd $HOME
16 | touch build.jam
17 | b2 -v
18 | b2 -n --debug-configuration ${TOOLSET:+toolset=$TOOLSET}
19 | displayName: Bootstrap
20 | - { bash: "./.ci/b2_example.sh example/hello", displayName: "example/hello" }
21 | - { bash: "./.ci/b2_example.sh example/libraries", displayName: "example/libraries" }
22 | - { bash: "./.ci/b2_example.sh example/make", displayName: "example/make" }
23 |
--------------------------------------------------------------------------------
/src/tools/features/objcflags-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.mflags]]`mflags`::
11 | The value of this feature is passed without modification to the tool when
12 | compiling Objective C sources.
13 |
14 |
15 | |# # end::doc[]
16 |
17 | feature.feature mflags
18 | :
19 | : free optional ;
20 |
21 | #| tag::doc[]
22 |
23 | [[b2.builtin.features.mmflags]]`mmflags`::
24 | The value of this feature is passed without modification to the tool when
25 | compiling Objective {CPP} sources.
26 |
27 |
28 | |# # end::doc[]
29 |
30 | feature.feature mmflags
31 | :
32 | : free optional ;
33 |
--------------------------------------------------------------------------------
/src/engine/events.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2024 René Ferdinand Rivera Morell
3 | Distributed under the Boost Software License, Version 1.0.
4 | (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
5 | */
6 |
7 | #ifndef B2_EVENTS_H
8 | #define B2_EVENTS_H
9 |
10 | #include "config.h"
11 |
12 | #include "rules.h"
13 |
14 | #include
15 | #include
16 |
17 | namespace b2 {
18 |
19 | enum class event_tag : uint16_t
20 | {
21 | unknown = 0,
22 | pre_exec_cmd,
23 | exit_main
24 | };
25 |
26 | template
27 | uint64_t add_event_callback(
28 | event_tag tag, std::function && call, int32_t priority = 0);
29 | void remove_event_callback(uint64_t e);
30 |
31 | void trigger_event_pre_exec_cmd(TARGET * t);
32 | void trigger_event_exit_main(int status);
33 |
34 | } // namespace b2
35 |
36 | #endif
37 |
--------------------------------------------------------------------------------
/src/engine/types.h:
--------------------------------------------------------------------------------
1 | /* Copyright 2019-2023 René Ferdinand Rivera Morell
2 | * Distributed under the Boost Software License, Version 1.0.
3 | * (See accompanying file LICENSE.txt or
4 | * https://www.bfgroup.xyz/b2/LICENSE.txt)
5 | */
6 |
7 | #ifndef B2_TYPES_H
8 | #define B2_TYPES_H
9 |
10 | #include "config.h"
11 |
12 | #include
13 |
14 | #if B2_USE_STD_THREADS
15 | #include
16 | #endif
17 |
18 | namespace b2 {
19 | using string_t = std::string;
20 | using int_t = int;
21 | using uint_t = unsigned int;
22 |
23 | #if B2_USE_STD_THREADS
24 |
25 | using mutex_t = std::mutex;
26 | using scope_lock_t = std::unique_lock;
27 |
28 | #else
29 |
30 | struct mutex_t
31 | {};
32 | struct scope_lock_t
33 | {
34 | inline scope_lock_t(mutex_t &) {}
35 | };
36 |
37 | #endif
38 |
39 | } // namespace b2
40 |
41 | #endif
42 |
--------------------------------------------------------------------------------
/example/pch-multi/jamroot.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2006 Ilya Sokolov
2 | #
3 | # Distributed under the Boost Software License, Version 1.0. (See
4 | # accompanying file LICENSE.txt or copy at
5 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | # pch ##########################################################################
8 |
9 | import pch ;
10 |
11 | local pchs ;
12 | for local hpp in [ glob-tree *.hpp ]
13 | {
14 | cpp-pch $(hpp:B) : $(hpp) : include ;
15 | explicit $(hpp:B) ;
16 | pchs += $(hpp:B) ;
17 | }
18 | alias headers : $(pchs) ;
19 |
20 | # exe ##########################################################################
21 |
22 | exe hello_world
23 | : # sources
24 | headers
25 | source/hello_world.cpp
26 | : # requirements
27 | include
28 | : # default build
29 | : # usage requirements
30 | ;
31 |
--------------------------------------------------------------------------------
/test/c_file.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright 2003 Vladimir Prus
4 | # Distributed under the Boost Software License, Version 1.0.
5 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | # Test that C files are compiled by a C compiler.
8 |
9 | import BoostBuild
10 |
11 | t = BoostBuild.Tester(use_test_config=False)
12 |
13 | t.write("jamroot.jam", """
14 | project ;
15 | exe hello : hello.cpp a.c ;
16 | """)
17 |
18 | t.write("hello.cpp", """
19 | extern "C" int foo();
20 | int main() { return foo(); }
21 | """)
22 |
23 | t.write("a.c", """
24 | // This will not compile unless in C mode.
25 | int foo()
26 | {
27 | int new = 0;
28 | new = (new+1)*7;
29 | return new;
30 | }
31 | """)
32 |
33 | t.run_build_system()
34 | t.expect_addition("bin/$toolset/debug*/hello.exe")
35 |
36 | t.cleanup()
37 |
--------------------------------------------------------------------------------
/test/conditionals3.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright 2003 Vladimir Prus
4 | # Distributed under the Boost Software License, Version 1.0.
5 | # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
6 |
7 | # Test that conditional properties work, even if property is free, and value
8 | # includes a colon.
9 |
10 | import BoostBuild
11 |
12 | t = BoostBuild.Tester(use_test_config=False)
13 |
14 | t.write("jamroot.jam", """
15 | exe hello : hello.cpp : debug:"CLASS=Foo::Bar" ;
16 | """)
17 |
18 | t.write("hello.cpp", """
19 | namespace Foo { class Bar { } ; }
20 | int main()
21 | {
22 | CLASS c;
23 | c; // Disables the unused variable warning.
24 | }
25 | """)
26 |
27 | t.run_build_system(stdout=None, stderr=None)
28 | t.expect_addition("bin/$toolset/debug*/hello.exe")
29 |
30 | t.cleanup()
31 |
--------------------------------------------------------------------------------
/test/qt5/qtgamepad.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2016
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtGamepad
7 |
8 | #include
9 |
10 | #include
11 |
12 | BOOST_AUTO_TEST_CASE( defines)
13 | {
14 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
15 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GAMEPAD_LIB), true);
16 | }
17 |
18 | /*!
19 | Try to detect a device
20 | */
21 | BOOST_AUTO_TEST_CASE( gamepad )
22 | {
23 | auto gamepads = QGamepadManager::instance()->connectedGamepads();
24 | if (gamepads.isEmpty()) {
25 | return;
26 | }
27 |
28 | QGamepad gamepad(*gamepads.begin());
29 | }
30 |
--------------------------------------------------------------------------------
/bootstrap.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 |
3 | REM Copyright (C) 2009 Vladimir Prus
4 | REM Copyright 2019-2020 Rene Rivera
5 | REM
6 | REM Distributed under the Boost Software License, Version 1.0.
7 | REM (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
8 |
9 |
10 | :b2_build
11 | ECHO Building the B2 engine..
12 | setlocal
13 | pushd src\engine
14 | call .\build.bat %*
15 | @ECHO OFF
16 | if not errorlevel 1 (
17 | if exist b2.exe (
18 | popd
19 | copy .\src\engine\b2.exe . > nul
20 | goto :b2_built))
21 | goto :b2_failure
22 |
23 |
24 | :b2_built
25 | ECHO.
26 | ECHO Building is done. To install, run:
27 | ECHO.
28 | ECHO .\b2 --prefix=DIR install
29 | ECHO.
30 | exit /b 0
31 |
32 |
33 | :b2_failure
34 | ECHO.
35 | ECHO Failed to build the B2 engine.
36 | ECHO.
37 | cmd /c exit 1
38 |
--------------------------------------------------------------------------------
/doc/src/b2.css:
--------------------------------------------------------------------------------
1 | .admonitionblock .icon .title {
2 | font-size: 2.5em;
3 | text-shadow: 1px 1px 2px rgba(0, 0, 0, .5);
4 | }
5 | .caution .icon .title {
6 | color: rgba(192, 51, 0, 1);
7 | }
8 | .important .icon .title {
9 | color: rgba(192, 0, 0, 1);
10 | }
11 | .note .icon .title {
12 | color: rgba(26, 64, 128, 1);
13 | }
14 | .tip .icon .title {
15 | color: rgba(255, 192, 0, 1);
16 | }
17 | .warning .icon .title {
18 | color: rgba(192, 102, 0, 1);
19 | }
20 | p,blockquote,dt,td.content,span.alt {
21 | font-size: 1.1rem
22 | }
23 | h1, h2, h3, h4, h5, h6 {
24 | font-weight: bold;
25 | }
26 | h1 {
27 | font-size: 2.25em;
28 | }
29 | h2 {
30 | font-size: 1.5em;
31 | }
32 | h3,#toctitle,.sidebarblock>.content>.title {
33 | font-size: 1.3em;
34 | }
35 | h4, h5 {
36 | font-size: 1.2em;
37 | }
38 | h6 {
39 | font-size: 1.1em;
40 | }
41 |
--------------------------------------------------------------------------------
/src/tools/features/define-feature.jam:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Rene Rivera
2 | # Distributed under the Boost Software License, Version 1.0.
3 | # (See accompanying file LICENSE.txt or copy at
4 | # https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | import feature ;
7 |
8 | #| tag::doc[]
9 |
10 | [[b2.builtin.features.define]]`define`::
11 | Specifies a preprocessor symbol that should be defined on the command line.
12 | You may either specify just the symbol, which will be defined without any
13 | value, or both the symbol and the value, separated by equal sign.
14 |
15 | |# # end::doc[]
16 |
17 | feature.feature define
18 | :
19 | : free ;
20 |
21 | #| tag::undef-doc[]
22 |
23 | [[b2.builtin.features.undef]]`undef`::
24 | Specifies a preprocessor symbol to undefine.
25 |
26 | |# # end::undef-doc[]
27 |
28 | feature.feature undef
29 | :
30 | : free ;
31 |
--------------------------------------------------------------------------------
/test/qt4/qtxml.cpp:
--------------------------------------------------------------------------------
1 | // (c) Copyright Juergen Hunold 2008
2 | // Use, modification and distribution is subject to the Boost Software
3 | // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
4 | // https://www.bfgroup.xyz/b2/LICENSE.txt)
5 |
6 | #define BOOST_TEST_MODULE QtXml
7 |
8 | #include
9 |
10 | #include
11 |
12 | BOOST_AUTO_TEST_CASE( defines)
13 | {
14 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
15 | BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_XML_LIB), true);
16 | }
17 |
18 | BOOST_AUTO_TEST_CASE( reader_construct)
19 | {
20 | QXmlStreamReader reader;
21 | BOOST_CHECK_EQUAL(reader.atEnd(), false);
22 | }
23 |
24 | BOOST_AUTO_TEST_CASE( writer_construct)
25 | {
26 | QXmlStreamWriter writer;
27 | BOOST_CHECK_EQUAL(writer.device(), static_cast