Path: blob/master/Help/guide/tutorial/Step6/CMakeLists.txt
5018 views
cmake_minimum_required(VERSION 3.23)12project(Tutorial)34option(TUTORIAL_BUILD_UTILITIES "Build the Tutorial executable" ON)5option(TUTORIAL_USE_STD_SQRT "Use std::sqrt" OFF)67# TODO6: Add a default-ON option named TUTORIAL_ENABLE_IPO with a doc string:8# "Check for and use IPO support"910# TODO7: Include and use the CheckIPOSupported module to enable IPO if11# TUTORIAL_ENABLE_IPO is True. To enable IPO, use:12# set(CMAKE_INTERPROCEDURAL_OPTIMIZATION True)13# Otherwise, follow the examples in the CheckIPOSupported documentation.14# Specifically, follow the documentation example to emit an error message15# if IPO is unavailable. Additionally, when IPO is available, emit a16# message indicating so (otherwise IPO has no easily visible change in17# the logs or build).1819if(TUTORIAL_BUILD_UTILITIES)20add_subdirectory(Tutorial)21endif()2223add_subdirectory(MathFunctions)242526