CMakeLists.txt 586 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. option(TUTORIAL_ENABLE_IPO "Check for and use IPO support" ON)
  6. if(TUTORIAL_ENABLE_IPO)
  7. include(CheckIPOSupported)
  8. check_ipo_supported(RESULT result OUTPUT output)
  9. if(result)
  10. set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
  11. else()
  12. message(WARNING "IPO is not supported ${message}")
  13. endif()
  14. endif()
  15. if(TUTORIAL_BUILD_UTILITIES)
  16. add_subdirectory(Tutorial)
  17. endif()
  18. add_subdirectory(MathFunctions)