readme.adoc 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. ////
  2. Copyright 2008 Jurko Gospodnetic
  3. Copyright 2017 Rene Rivera
  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. = Hello
  8. This example shows a very basic Boost Build project set up so it compiles a
  9. single executable from a single source file:
  10. .`hello.cpp`
  11. [source,cpp]
  12. ----
  13. include::../../example/hello/hello.cpp[tag=source]
  14. ----
  15. Our `jamroot.jam` is minimal and only specifies one `exe` target for the
  16. program:
  17. .`jamroot.jam`
  18. [source,jam]
  19. ----
  20. include::jamroot.jam[]
  21. ----
  22. Building the example yields:
  23. [source,bash]
  24. ----
  25. > cd /example/hello
  26. > b2
  27. ...found 8 targets...
  28. ...updating 4 targets...
  29. common.mkdir bin/clang-darwin-4.2.1
  30. common.mkdir bin/clang-darwin-4.2.1/debug
  31. clang-darwin.compile.c++ bin/clang-darwin-4.2.1/debug/hello.o
  32. clang-darwin.link bin/clang-darwin-4.2.1/debug/hello
  33. ...updated 4 targets...
  34. > bin/clang-darwin-4.2.1/debug/hello
  35. Hello!
  36. ----
  37. NOTE: The actual paths in the `bin` sub-directory will depend on your
  38. toolset.