Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Kitware
GitHub Repository: Kitware/CMake
Path: blob/master/Help/guide/tutorial/Step6/CMakeLists.txt
5018 views
1
cmake_minimum_required(VERSION 3.23)
2
3
project(Tutorial)
4
5
option(TUTORIAL_BUILD_UTILITIES "Build the Tutorial executable" ON)
6
option(TUTORIAL_USE_STD_SQRT "Use std::sqrt" OFF)
7
8
# TODO6: Add a default-ON option named TUTORIAL_ENABLE_IPO with a doc string:
9
# "Check for and use IPO support"
10
11
# TODO7: Include and use the CheckIPOSupported module to enable IPO if
12
# TUTORIAL_ENABLE_IPO is True. To enable IPO, use:
13
# set(CMAKE_INTERPROCEDURAL_OPTIMIZATION True)
14
# Otherwise, follow the examples in the CheckIPOSupported documentation.
15
# Specifically, follow the documentation example to emit an error message
16
# if IPO is unavailable. Additionally, when IPO is available, emit a
17
# message indicating so (otherwise IPO has no easily visible change in
18
# the logs or build).
19
20
if(TUTORIAL_BUILD_UTILITIES)
21
add_subdirectory(Tutorial)
22
endif()
23
24
add_subdirectory(MathFunctions)
25
26