Skip to content

Commit 8c5f0c5

Browse files
Merge pull request #181 from leha-bot/dont-set-cxx-std-if-it-gt-17
FindFilesystem.cmake: set CMAKE_CXX_STANDARD to 17 if not set
2 parents 36a271f + aede759 commit 8c5f0c5

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)