Skip to content

Commit d298434

Browse files
committed
openmp disabled print
1 parent f787823 commit d298434

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

openmp/CMakeLists.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.19...3.21)
1+
cmake_minimum_required(VERSION 3.19...3.22)
22
project(OpenMP_Fortran
33
LANGUAGES Fortran)
44

@@ -21,13 +21,12 @@ rate = omp_get_wtick()
2121
end program"
2222
hasOMP)
2323

24-
if(NOT hasOMP)
25-
message(STATUS "${CMAKE_Fortran_COMPILER_ID} ${CMAKE_Fortran_COMPILER_VERSION} does not support OpenMP.")
26-
return()
27-
endif()
2824

2925
set_directory_properties(PROPERTIES LABELS openmp)
3026

3127
add_executable(timeprec timeprec.f90)
28+
set_target_properties(timeprec PROPERTIES EXCLUDE_FROM_ALL $<NOT:${hasOMP}>)
3229
target_link_libraries(timeprec PRIVATE OpenMP::OpenMP_Fortran)
33-
add_test(NAME "OpenMP:TimeMeasure" COMMAND timeprec)
30+
31+
add_test(NAME OpenMP:TimeMeasure COMMAND timeprec)
32+
set_tests_properties(OpenMP:TimeMeasure PROPERTIES DISABLED $<NOT:${hasOMP}>)

system/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
cmake_minimum_required(VERSION 3.14...3.20)
2-
project(F18system Fortran)
3-
4-
enable_testing()
5-
61
set_directory_properties(PROPERTIES LABELS system)
72

83
add_executable(color color_text.f90)

0 commit comments

Comments
 (0)