build.jam 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Copyright Rene Rivera 2014-2019
  2. # Distributed under the Boost Software License, Version 1.0.
  3. # (See accompanying file LICENSE_1_0.txt or copy at
  4. # http://www.boost.org/LICENSE_1_0.txt)
  5. #|
  6. This B2 project provides support for using the Predef library externally as
  7. a standalone project or by embedding in your B2 project tree. To use
  8. externally you would need a `use-project` declaration and to use the
  9. project as a dependency where needed:
  10. ----
  11. use-project /hash-predef : /path/to/hash-predef/root ;
  12. exe my_thing : main.cpp : <dependency>/hash-predef ;
  13. ----
  14. To use in your project tree you would only need to place the Predef tree
  15. in a subdirectory and reference the project location as a dependency where
  16. needed.
  17. ----
  18. exe my_thin : main.cpp : <dependency>libs/hash-predef ;
  19. ----
  20. |#
  21. import project ;
  22. path-constant BOOST_PREDEF_ROOT : . ;
  23. path-constant BOOST_PREDEF_INCLUDE : include ;
  24. constant PREDEF_DIST : boost ;
  25. project /boost/predef
  26. : usage-requirements
  27. <include>$(BOOST_PREDEF_INCLUDE) ;
  28. if [ project.is-jamroot-module $(__name__) ]
  29. {
  30. local attributes = [ project.attributes $(__name__) ] ;
  31. $(attributes).set "build-dir" : bin ;
  32. }
  33. alias libs ;