CMakeLists.txt 964 B

123456789101112131415161718192021222324252627282930313233
  1. # Copyright 2019 Mike Dev
  2. # Distributed under the Boost Software License, Version 1.0.
  3. # See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
  4. #
  5. # NOTE: CMake support for Boost.Rational is currently experimental at best
  6. # and the interface is likely to change in the future
  7. cmake_minimum_required( VERSION 3.5 )
  8. project( BoostRational LANGUAGES CXX)
  9. option( BOOST_RATIONAL_INCLUDE_TESTS "Add boost rational tests" OFF )
  10. add_library( boost_rational INTERFACE )
  11. add_library( Boost::rational ALIAS boost_rational )
  12. target_include_directories( boost_rational INTERFACE include )
  13. target_link_libraries( boost_rational
  14. INTERFACE
  15. Boost::assert
  16. Boost::config
  17. Boost::core
  18. Boost::integer
  19. Boost::static_assert
  20. Boost::throw_exception
  21. Boost::type_traits
  22. Boost::utility
  23. )
  24. if( BOOST_RATIONAL_INCLUDE_TESTS )
  25. enable_testing()
  26. add_subdirectory( test )
  27. endif()