# CMake Tutorial Step 3 Exercise 2

**URL:** <https://discourse.cmake.org/t/cmake-tutorial-step-3-exercise-2/15046>\
**Category:** Code\
**Created:** [August 18, 2025, 8:24pm UTC](https://discourse.cmake.org/t/cmake-tutorial-step-3-exercise-2/15046 "2025-08-18T20:24:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kyuhyun\_Park](https://discourse.cmake.org/user_avatar/discourse.cmake.org/kyuhyun_park/32/5765_2.png) [@Kyuhyun\_Park](https://discourse.cmake.org/u/Kyuhyun_Park)\
**Post date:** [August 18, 2025, 8:24pm UTC](https://discourse.cmake.org/t/cmake-tutorial-step-3-exercise-2/15046/1 "2025-08-18T20:24:49Z")

</div>

I am trying to get some help on a CMake tutorial, Step 3, Exercise 2  
[https://cmake.org/cmake/help/latest/guide/tutorial/Adding%20Usage%20Requirements%20for%20a%20Library.html#exercise-2-setting-the-c-standard-with-interface-libraries](https://cmake.org/cmake/help/latest/guide/tutorial/Adding%20Usage%20Requirements%20for%20a%20Library.html#exercise-2-setting-the-c-standard-with-interface-libraries)

It asks the user to remove the following lines.  
set(CMAKE\_CXX\_STANDARD 11)  
set(CMAKE\_CXX\_STANDARD\_REQUIRED True)  
and create an INTERFACE library target\_compile\_features(tutorial\_compiler\_flags INTERFACE cxx\_std\_11) and link tutorial\_compiler\_flags to other targets (libraries and executable).

In my opinion, the problem asks me to eliminate the global constraints and make the system more flexible, allowing any libraries linking to our executable to use any C++ version.

However, the solution manual (TODO 5-7) links to the INTERFACE library tutorial\_compiler\_flags using the PUBLIC keyword. I think this means that any library or executable linking to my executable will also have to use C++11, and the same applies to me. Since the point of the exercise was to make the system more flexible, I considered using the PRIVATE keyword to be more appropriate.

Do you think I misunderstood some concept?
