Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Nov 21, 2021
1 parent 82f6d8e commit d3c954c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ interface.f90
read.f90 ${CMAKE_CURRENT_BINARY_DIR}/reader.f90
write.f90 ${CMAKE_CURRENT_BINARY_DIR}/writer.f90
attributes.f90
${CMAKE_CURRENT_BINARY_DIR}/pathlib.f90)
${CMAKE_CURRENT_BINARY_DIR}/pathlib.f90
)
28 changes: 18 additions & 10 deletions src/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
set_directory_properties(PROPERTIES LABELS nc4fortran)

add_executable(test_minimal test_minimal.f90)
target_link_libraries(test_minimal PRIVATE nc4fortran::nc4fortran)
set_target_properties(test_minimal PROPERTIES LABELS unit)
add_test(NAME nc4fortran:minimal COMMAND $<TARGET_FILE:test_minimal>
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
set_tests_properties(nc4fortran:minimal PROPERTIES
FIXTURES_SETUP nclib
LABELS core)
add_test(NAME minimal COMMAND $<TARGET_FILE:test_minimal>
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
set_tests_properties(minimal PROPERTIES
FIXTURES_SETUP nclib
LABELS core
)

foreach(t array attributes deflate destructor error exist scalar shape string)
add_executable(test_${t} test_${t}.f90)
target_link_libraries(test_${t} PRIVATE nc4fortran::nc4fortran)
target_link_libraries(test_${t} PRIVATE :nc4fortran)
set_target_properties(test_${t} PROPERTIES LABELS unit)
target_compile_options(test_${t} PRIVATE "$<$<Fortran_COMPILER_ID:GNU>:-Wno-compare-reals>")

add_test(NAME nc4fortran:${t} COMMAND $<TARGET_FILE:test_${t}> WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
set_tests_properties(nc4fortran:${t} PROPERTIES
FIXTURES_REQUIRED nclib
LABELS unit)
add_test(NAME ${t}
COMMAND test_${t}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
set_tests_properties(${t} PROPERTIES
FIXTURES_REQUIRED nclib
LABELS unit
)
endforeach()

0 comments on commit d3c954c

Please sign in to comment.