Skip to content

Commit 4196f42

Browse files
committed
Only build and run GCC 7 tests with >= GCC 7
Wrap build and add test commands with conditionals
1 parent d510348 commit 4196f42

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,12 +362,14 @@ if(opencoarrays_aware_compiler)
362362
add_mpi_test(register 2 ${tests_root}/unit/init_register/register)
363363
add_mpi_test(register_vector 2 ${tests_root}/unit/init_register/register_vector)
364364
add_mpi_test(register_alloc_vector 2 ${tests_root}/unit/init_register/register_alloc_vector)
365-
add_mpi_test(register_alloc_comp_1 2 ${tests_root}/unit/init_register/register_alloc_comp_1)
366-
add_mpi_test(register_alloc_comp_2 2 ${tests_root}/unit/init_register/register_alloc_comp_2)
367-
add_mpi_test(register_alloc_comp_3 2 ${tests_root}/unit/init_register/register_alloc_comp_3)
368365
add_mpi_test(allocate_as_barrier 2 ${tests_root}/unit/init_register/allocate_as_barrier)
369366
add_mpi_test(allocate_as_barrier_proc 32 ${tests_root}/unit/init_register/allocate_as_barrier_proc)
370-
# add_mpi_test(check_remote_alloced_comp_1 6 ${tests_root}/unit/init_register/check_remote_alloced_comp_1)
367+
if (gfortran_compiler AND (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7))
368+
add_mpi_test(register_alloc_comp_1 2 ${tests_root}/unit/init_register/register_alloc_comp_1)
369+
add_mpi_test(register_alloc_comp_2 2 ${tests_root}/unit/init_register/register_alloc_comp_2)
370+
add_mpi_test(register_alloc_comp_3 2 ${tests_root}/unit/init_register/register_alloc_comp_3)
371+
add_mpi_test(check_remote_alloced_comp_1 6 ${tests_root}/unit/init_register/check_remote_alloced_comp_1)
372+
endif()
371373
add_mpi_test(get_array 2 ${tests_root}/unit/send-get/get_array)
372374
add_mpi_test(get_self 2 ${tests_root}/unit/send-get/get_self)
373375
add_mpi_test(send_array 2 ${tests_root}/unit/send-get/send_array)

src/tests/unit/init_register/CMakeLists.txt

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,22 @@ target_link_libraries(register_vector OpenCoarrays)
1010
add_executable(register_alloc_vector register_alloc_vector.f90)
1111
target_link_libraries(register_alloc_vector OpenCoarrays)
1212

13-
add_executable(register_alloc_comp_1 register_alloc_comp_1.f90)
14-
target_link_libraries(register_alloc_comp_1 OpenCoarrays)
15-
16-
add_executable(register_alloc_comp_2 register_alloc_comp_2.f90)
17-
target_link_libraries(register_alloc_comp_2 OpenCoarrays)
18-
19-
add_executable(register_alloc_comp_3 register_alloc_comp_3.f90)
20-
target_link_libraries(register_alloc_comp_3 OpenCoarrays)
21-
2213
add_executable(allocate_as_barrier allocate_as_barrier.f90)
2314
target_link_libraries(allocate_as_barrier OpenCoarrays)
2415

2516
add_executable(allocate_as_barrier_proc allocate_as_barrier_proc.f90)
2617
target_link_libraries(allocate_as_barrier_proc OpenCoarrays)
2718

28-
add_executable(check_remote_alloced_comp_1 check_remote_alloced_comp_1.f90)
29-
target_link_libraries(check_remote_alloced_comp_1 OpenCoarrays)
19+
if (gfortran_compiler AND (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7))
20+
add_executable(check_remote_alloced_comp_1 check_remote_alloced_comp_1.f90)
21+
target_link_libraries(check_remote_alloced_comp_1 OpenCoarrays)
22+
23+
add_executable(register_alloc_comp_1 register_alloc_comp_1.f90)
24+
target_link_libraries(register_alloc_comp_1 OpenCoarrays)
25+
26+
add_executable(register_alloc_comp_2 register_alloc_comp_2.f90)
27+
target_link_libraries(register_alloc_comp_2 OpenCoarrays)
28+
29+
add_executable(register_alloc_comp_3 register_alloc_comp_3.f90)
30+
target_link_libraries(register_alloc_comp_3 OpenCoarrays)
31+
endif()

0 commit comments

Comments
 (0)