Skip to content

Commit c79721a

Browse files
committed
announce CI-disabled tests
1 parent 42d8429 commit c79721a

File tree

6 files changed

+28
-60
lines changed

6 files changed

+28
-60
lines changed

block/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
if(NOT f08block)
2-
message(STATUS "SKIP: F2008 block not supported by ${CMAKE_Fortran_COMPILER_ID} ${CMAKE_Fortran_COMPILER_VERSION}")
3-
return()
4-
endif()
5-
61
set_directory_properties(PROPERTIES LABELS block)
72

83
add_executable(block block.f90)

character/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@ add_test(NAME char:SplitString COMMAND $<TARGET_FILE:split>)
1616
add_executable(str2int str2int.f90)
1717
add_test(NAME char:Str2Int COMMAND $<TARGET_FILE:str2int>)
1818

19-
if(f03utf8)
2019
add_executable(utf8 utf8.f90)
20+
set_target_properties(utf8 PROPERTIES EXCLUDE_FROM_ALL $<NOT:$<BOOL:${f03utf8}>>)
2121
add_test(NAME char:utf8 COMMAND $<TARGET_FILE:utf8>)
22-
else()
23-
message(STATUS "SKIP: UTF8 ${CMAKE_Fortran_COMPILER_ID} ${CMAKE_Fortran_COMPILER_VERSION}")
24-
endif()
22+
set_tests_properties(char:utf8 PROPERTIES DISABLED $<NOT:$<BOOL:${f03utf8}>>)
2523

2624
add_executable(printorwrite print_vs_write.f90)
2725
add_test(NAME char:print_utf8 COMMAND $<TARGET_FILE:printorwrite>)

contiguous/CMakeLists.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
2-
if(NOT f08contig)
3-
message(STATUS "SKIP: contiguous arrays")
4-
return()
5-
endif()
6-
71
add_executable(contig contiguous.f90)
2+
set_target_properties(contig PROPERTIES EXCLUDE_FROM_ALL $<NOT:$<BOOL:${f08contig}>>)
83
add_test(NAME contiguous COMMAND $<TARGET_FILE:contig>)
4+
set_tests_properties(contiguous PROPERTIES DISABLED $<NOT:$<BOOL:${f08contig}>>)

io/CMakeLists.txt

Lines changed: 12 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
1-
cmake_minimum_required(VERSION 3.14...3.21)
2-
project(fortran2018io
3-
LANGUAGES Fortran)
4-
enable_testing()
5-
61
set_directory_properties(PROPERTIES LABELS io)
72

8-
if(f08block)
9-
add_library(logging OBJECT logging.f90)
3+
add_library(logging OBJECT logging.f90)
104

11-
add_executable(append_file append_file.f90)
12-
target_link_libraries(append_file PRIVATE logging pathlib)
13-
add_test(NAME io:appendFile COMMAND append_file)
14-
endif(f08block)
5+
add_executable(append_file append_file.f90)
6+
target_link_libraries(append_file PRIVATE logging pathlib)
7+
add_test(NAME io:appendFile COMMAND append_file)
158

169
add_executable(termio terminal_io.f90)
17-
if(NOT WIN32)
18-
add_test(NAME io:terminal COMMAND bash -c "$<TARGET_FILE:termio> <<< 0")
19-
endif()
10+
add_test(NAME io:terminal COMMAND bash -c "$<TARGET_FILE:termio> <<< 0")
11+
set_tests_properties(io:terminal PROPERTIES DISABLED $<BOOL:${WIN32}>
12+
)
2013

2114
add_executable(leading_zeros leading_zeros.f90)
2215
add_test(NAME io:leading_zeros COMMAND leading_zeros)
@@ -34,25 +27,14 @@ add_executable(null devnull.f90)
3427
add_test(NAME io:nullfile COMMAND null)
3528

3629
# --- pathlib
37-
add_library(pathlib OBJECT pathlib.f90)
38-
if(WIN32)
39-
target_sources(pathlib PRIVATE pathlib_windows.f90)
40-
else()
41-
target_sources(pathlib PRIVATE pathlib_unix.f90)
42-
endif()
43-
if(CMAKE_Fortran_COMPILER_ID MATCHES "^Intel")
44-
target_sources(pathlib PRIVATE pathlib_intel.f90)
45-
else()
46-
target_sources(pathlib PRIVATE pathlib_gcc.f90)
47-
endif()
30+
add_library(pathlib OBJECT pathlib.f90
31+
$<IF:$<BOOL:${WIN32}>,pathlib_windows.f90,pathlib_unix.f90>
32+
$<IF:$<Fortran_COMPILER_ID:Intel,IntelLLVM>,pathlib_intel.f90,pathlib_gcc.f90>
33+
)
4834

4935
add_executable(test_pathlib test_pathlib.f90)
5036
target_link_libraries(test_pathlib pathlib)
5137
add_test(NAME io:pathlib COMMAND $<TARGET_FILE:test_pathlib>)
5238

5339
# future, when c++17 filesystem is better supported in general.
54-
# if(posixio_OK)
55-
# add_executable(realpath realpath_posix.f90)
56-
# elseif(windowsio_OK)
57-
# add_executable(realpath fullpath_windows.f90)
58-
# endif()
40+
# add_executable(realpath $<IF:$<BOOL:${posixio_OK}>,realpath_posix.f90,fullpath_windows.f90>)

standard/CMakeLists.txt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,9 @@ add_executable(justwait pause.f90)
3232
# NO test
3333

3434
# -- sleep
35-
add_library(sleep_std OBJECT)
36-
if(WIN32)
37-
target_sources(sleep_std PRIVATE sleep_win.f90)
38-
else()
39-
target_sources(sleep_std PRIVATE sleep_unix.f90)
40-
endif()
35+
add_library(sleep_std OBJECT
36+
$<IF:$<BOOL:${WIN32}>,sleep_win.f90,sleep_unix.f90>
37+
)
4138
target_include_directories(sleep_std INTERFACE
4239
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
4340
$<INSTALL_INTERFACE:include>)

system/CMakeLists.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ add_executable(complog compiler_log.f90)
1414
add_test(NAME system:Compiler COMMAND complog)
1515

1616
find_package(Python3 COMPONENTS Interpreter)
17-
if(Python3_FOUND)
18-
add_executable(callpython call_python_script.f90)
19-
add_test(NAME system:CallPython COMMAND callpython)
20-
endif()
17+
add_executable(callpython call_python_script.f90)
18+
add_test(NAME system:CallPython COMMAND callpython)
19+
set_tests_properties(system:CallPython PROPERTIES DISABLED $<NOT:$<BOOL:${Python3_FOUND}>>)
2120

2221
find_program(FFPLAY NAMES ffplay)
23-
if(FFPLAY)
24-
add_executable(playsound play_sound.f90)
25-
add_test(NAME system:PlaySound COMMAND $<TARGET_FILE:playsound> ${CMAKE_CURRENT_SOURCE_DIR}/bell.aac)
26-
set_tests_properties(system:PlaySound PROPERTIES TIMEOUT 15)
27-
endif()
22+
add_executable(playsound play_sound.f90)
23+
add_test(NAME system:PlaySound COMMAND $<TARGET_FILE:playsound> ${CMAKE_CURRENT_SOURCE_DIR}/bell.aac)
24+
set_tests_properties(system:PlaySound PROPERTIES
25+
TIMEOUT 15
26+
DISABLED $<NOT:$<BOOL:${FFPLAY}>>
27+
)

0 commit comments

Comments
 (0)