Skip to content

Commit 9d328de

Browse files
[cmake] Better way to enforce C++ 17 in CMakeLists.txt
1 parent 289e6b0 commit 9d328de

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ include(cmake/ros.cmake)
3131
compute_project_args(PROJECT_ARGS LANGUAGES CXX)
3232
project(${PROJECT_NAME} ${PROJECT_ARGS})
3333

34-
# if(NOT CMAKE_CXX_STANDARD)
35-
set(CMAKE_CXX_STANDARD 17)
36-
# endif()
34+
check_minimal_cxx_standard(17 ENFORCE)
3735

3836
cmake_policy(SET CMP0057 NEW)
3937
find_package(ament_cmake REQUIRED)

0 commit comments

Comments
 (0)