ranges_options.cmake 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Copyright Gonzalo Brito Gadeschi 2015
  2. # Distributed under the Boost Software License, Version 1.0.
  3. # (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
  4. #
  5. # CMake options
  6. include(CMakeDependentOption)
  7. set(RANGES_CXX_STD default CACHE STRING "C++ standard version.")
  8. option(RANGES_BUILD_CALENDAR_EXAMPLE "Builds the calendar example." ON)
  9. option(RANGES_ASAN "Run the tests using AddressSanitizer." OFF)
  10. option(RANGES_MSAN "Run the tests using MemorySanitizer." OFF)
  11. option(RANGES_ASSERTIONS "Enable assertions." ON)
  12. option(RANGES_DEBUG_INFO "Include debug information in the binaries." ON)
  13. option(RANGES_MODULES "Enables use of Clang modules (experimental)." OFF)
  14. option(RANGES_NATIVE "Enables -march/-mtune=native." ON)
  15. option(RANGES_VERBOSE_BUILD "Enables debug output from CMake." OFF)
  16. option(RANGES_LLVM_POLLY "Enables LLVM Polly." OFF)
  17. option(RANGES_ENABLE_WERROR
  18. "Enables -Werror. Only effective if compiler is not clang-cl or MSVC. ON by default"
  19. ON)
  20. option(RANGES_PREFER_REAL_CONCEPTS
  21. "Use real concepts instead of emulation if the compiler supports it"
  22. ON)
  23. option(RANGES_DEEP_STL_INTEGRATION
  24. "Hijacks the primary std::iterator_traits template to emulate the C++20 std::ranges:: behavior."
  25. OFF)
  26. option(RANGE_V3_HEADER_CHECKS
  27. "Build the Range-v3 header checks and integrate with ctest"
  28. OFF)
  29. set(RANGES_INLINE_THRESHOLD -1 CACHE STRING "Force a specific inlining threshold.")
  30. # Enable verbose configure when passing -Wdev to CMake
  31. if (DEFINED CMAKE_SUPPRESS_DEVELOPER_WARNINGS AND
  32. NOT CMAKE_SUPPRESS_DEVELOPER_WARNINGS)
  33. set(RANGES_VERBOSE_BUILD ON)
  34. endif()
  35. if (RANGES_VERBOSE_BUILD)
  36. message(STATUS "[range-v3]: verbose build enabled.")
  37. endif()
  38. CMAKE_DEPENDENT_OPTION(RANGE_V3_TESTS
  39. "Build the Range-v3 tests and integrate with ctest"
  40. ON "${is_standalone}" OFF)
  41. CMAKE_DEPENDENT_OPTION(RANGE_V3_EXAMPLES
  42. "Build the Range-v3 examples and integrate with ctest"
  43. ON "${is_standalone}" OFF)
  44. option(RANGE_V3_PERF
  45. "Build the Range-v3 performance benchmarks"
  46. OFF)
  47. CMAKE_DEPENDENT_OPTION(RANGE_V3_DOCS
  48. "Build the Range-v3 documentation"
  49. ON "${is_standalone}" OFF)
  50. mark_as_advanced(RANGE_V3_PERF)