File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,9 @@ set(CMAKE_REQUIRED_QUIET ${Filesystem_FIND_QUIETLY})
128
128
# All of our tests required C++17 or later
129
129
if (NOT DEFINED CMAKE_CXX_STANDARD OR CMAKE_CXX_STANDARD LESS 17 )
130
130
set (CMAKE_CXX_STANDARD 17 )
131
+ if (NOT DEFINED CMAKE_REQUIRED_FLAGS )
132
+ set (CMAKE_REQUIRED_FLAGS "-std=c++17" )
133
+ endif ()
131
134
endif ()
132
135
133
136
# Normalize and check the component list we were given
@@ -154,7 +157,7 @@ if(NOT "Experimental" IN_LIST want_components)
154
157
endif ()
155
158
156
159
if (find_final )
157
- check_include_file_cxx ("filesystem" _CXX_FILESYSTEM_HAVE_HEADER )
160
+ check_include_file_cxx ("filesystem" _CXX_FILESYSTEM_HAVE_HEADER CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} )
158
161
mark_as_advanced (_CXX_FILESYSTEM_HAVE_HEADER )
159
162
if (_CXX_FILESYSTEM_HAVE_HEADER )
160
163
# We found the non-experimental header. Don't bother looking for the
You can’t perform that action at this time.
0 commit comments