Skip to content

Commit 9075bae

Browse files
committed
compiler option generator exp
1 parent 841bd75 commit 9075bae

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/tests/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ endif()
2626

2727
add_executable(test_${name} test_${name}.f90)
2828
target_link_libraries(test_${name} PRIVATE h5fortran::h5fortran)
29-
if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
30-
target_compile_options(test_${name} PRIVATE -Wno-compare-reals -Wno-conversion)
31-
endif()
29+
target_compile_options(test_${name} PRIVATE "$<$<Fortran_COMPILER_ID:GNU>:-Wno-compare-reals;-Wno-conversion>")
3230
set_target_properties(test_${name} PROPERTIES LABELS unit)
3331

3432
add_test(NAME h5fortran:${name}

0 commit comments

Comments
 (0)