CMakeLists.txt 632 B

12345678910111213141516171819202122232425
  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. message("IPO is supported, enabling IPO")
  11. set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
  12. else()
  13. message(WARNING "IPO is not supported: ${output}")
  14. endif()
  15. endif()
  16. if(TUTORIAL_BUILD_UTILITIES)
  17. add_subdirectory(Tutorial)
  18. endif()
  19. add_subdirectory(MathFunctions)