File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -150,17 +150,22 @@ endif()
150
150
151
151
if (find_final)
152
152
check_include_file_cxx("coroutine" _CXX_COROUTINES_HAVE_HEADER)
153
+ if (_CXX_COROUTINES_HAVE_HEADER)
154
+ check_cxx_source_compiles("#include <coroutine> \n typedef std::suspend_never blub; \n int main() {} " _CXX_COROUTINES_FINAL_HEADER_COMPILES)
155
+ set (_CXX_COROUTINES_HAVE_HEADER ${}_CXX_COROUTINES_FINAL_HEADER_COMPILES})
156
+ endif ()
157
+
153
158
if (NOT _CXX_COROUTINES_HAVE_HEADER)
154
159
cmake_push_check_state()
155
160
set (CMAKE_REQUIRED_FLAGS "${_CXX_COROUTINES_EXTRA_FLAGS} " )
156
161
check_include_file_cxx("coroutine" _CXX_COROUTINES_HAVE_HEADER_WITH_FLAG)
162
+ if (_CXX_COROUTINES_HAVE_HEADER_WITH_FLAG)
163
+ check_cxx_source_compiles("#include <coroutine> \n typedef std::suspend_never blub; \n int main() {} " _CXX_COROUTINES_FINAL_HEADER_COMPILES_WITH_FLAG)
164
+ set (_CXX_COROUTINES_HAVE_HEADER_WITH_FLAG ${_CXX_COROUTINES_FINAL_HEADER_COMPILES_WITH_FLAG} )
165
+ endif ()
157
166
set (_CXX_COROUTINES_HAVE_HEADER ${_CXX_COROUTINES_HAVE_HEADER_WITH_FLAG} )
158
167
cmake_pop_check_state()
159
168
endif ()
160
- check_cxx_source_compiles("#include <coroutine> \n typedef std::suspend_never blub; \n int main() {} " _CXX_COROUTINES_FINAL_HEADER_COMPILES)
161
- if (NOT _CXX_COROUTINES_FINAL_HEADER_COMPILES)
162
- set (_CXX_COROUTINES_HAVE_HEADER FALSE )
163
- endif ()
164
169
mark_as_advanced (_CXX_COROUTINES_HAVE_HEADER)
165
170
if (_CXX_COROUTINES_HAVE_HEADER)
166
171
# We found the non-experimental header. Don't bother looking for the
You can’t perform that action at this time.
0 commit comments