File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 11include (CheckIncludeFile)
22include (CheckSymbolExists)
3+ include (CheckIncludeFileCXX)
34
45# --- abi check: C++ and Fortran compiler ABI compatibility
56
Original file line number Diff line number Diff line change @@ -10,14 +10,19 @@ if(HAVE_C_ALLOC_CHAR)
1010 add_test (NAME string_view COMMAND string_view)
1111endif ()
1212
13+ check_include_file_cxx(span HAVE_SPAN)
1314
14- if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 12)
15+ if (NOT HAVE_SPAN OR
16+ (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND
17+ CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 12))
1518 set (sampling_old TRUE )
1619endif ()
1720
1821if (NOT sampling_old)
1922add_executable (sampling sampling.cpp sampling.f90)
2023set_property (TARGET sampling PROPERTY LINKER_LANGUAGE CXX)
24+ target_compile_features (sampling PRIVATE cxx_std_20)
25+
2126add_test (NAME sampling COMMAND sampling)
2227endif ()
2328
You can’t perform that action at this time.
0 commit comments