CMakeLists.txt 927 B

123456789101112131415161718192021222324
  1. cmake_minimum_required(VERSION 3.23)
  2. project(Tutorial)
  3. option(TUTORIAL_BUILD_UTILITIES "Build the Tutorial executable" ON)
  4. option(TUTORIAL_USE_STD_SQRT "Use std::sqrt" OFF)
  5. # TODO6: Add a default-ON option named TUTORIAL_ENABLE_IPO with a doc string:
  6. # "Check for and use IPO support"
  7. # TODO7: Include and use the CheckIPOSupported module to enable IPO if
  8. # TUTORIAL_ENABLE_IPO is True. To enable IPO, use:
  9. # set(CMAKE_INTERPROCEDURAL_OPTIMIZATION True)
  10. # Otherwise, follow the examples in the CheckIPOSupported documentation.
  11. # Specifically, follow the documentation example to emit an error message
  12. # if IPO is unavailable. Additionally, when IPO is available, emit a
  13. # message indicating so (otherwise IPO has no easily visible change in
  14. # the logs or build).
  15. if(TUTORIAL_BUILD_UTILITIES)
  16. add_subdirectory(Tutorial)
  17. endif()
  18. add_subdirectory(MathFunctions)