Skip to content

Commit aede759

Browse files
committed
FindFilesystem.cmake: set CMAKE_CXX_STANDARD to 17 if not set
Or less than 17.
1 parent 26cfa75 commit aede759

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmake/FindFilesystem.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ cmake_push_check_state()
126126
set(CMAKE_REQUIRED_QUIET ${Filesystem_FIND_QUIETLY})
127127

128128
# All of our tests required C++17 or later
129-
set(CMAKE_CXX_STANDARD 17)
129+
if(NOT DEFINED CMAKE_CXX_STANDARD OR CMAKE_CXX_STANDARD LESS 17)
130+
set(CMAKE_CXX_STANDARD 17)
131+
endif()
130132

131133
# Normalize and check the component list we were given
132134
set(want_components ${Filesystem_FIND_COMPONENTS})

0 commit comments

Comments
 (0)