Skip to content

Commit 21eba01

Browse files
committed
docs: Update way that C++ standard is defined in example
1 parent 5c733cd commit 21eba01

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ReadMe.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,17 @@ In your CMake package you can then find the package and link to it as follows:
8080
cmake_minimum_required(VERSION 3.20)
8181
project(your_project)
8282
83-
set(CMAKE_CXX_STANDARD 17)
84-
set(CMAKE_CXX_STANDARD_REQUIRED True)
85-
8683
find_package(myactuator_rmd REQUIRED)
8784
8885
add_executable(your_node
8986
src/main.cpp
9087
)
91-
target_link_libraries(your_node PUBLIC myactuator_rmd::myactuator_rmd)
88+
target_compile_features(your_node PUBLIC
89+
cxx_std_17
90+
)
91+
target_link_libraries(your_node PUBLIC
92+
myactuator_rmd::myactuator_rmd
93+
)
9294
```
9395

9496
A minimal example for the `main.cpp` can be found below:

0 commit comments

Comments
 (0)