fabscript 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. # -*- python -*-
  2. #
  3. # Copyright (c) 2017 Stefan Seefeld
  4. # All rights reserved.
  5. #
  6. # Distributed under the Boost Software License, Version 1.0.
  7. # (See accompanying file LICENSE_1_0.txt or copy at
  8. # http://www.boost.org/LICENSE_1_0.txt)
  9. from faber import platform
  10. from faber.feature import set
  11. from faber.tools.compiler import include, define, linkpath
  12. from os.path import join
  13. features += include('include')
  14. features += define('BOOST_ALL_NO_LIB') # disable auto-linking
  15. boost_prefix = options.get_with('boost-prefix')
  16. boost_include = options.get_with('boost-include')
  17. boost_lib = options.get_with('boost-lib')
  18. boost_suffix = options.get_with('boost-suffix')
  19. if boost_prefix:
  20. features += set(include(join(boost_prefix, 'include')), linkpath(join(boost_prefix, 'lib')))
  21. else:
  22. if boost_include:
  23. features += include(boost_include)
  24. if boost_lib:
  25. features += linkpath(boost_lib)
  26. test = module('test', features=features)
  27. io_test = module('io_test', 'io/test', features=features)
  28. toolbox_test = module('toolbox_test', 'toolbox/test', features=features)