From d3c954c503c6bf66d562318808234a4b55aef3f7 Mon Sep 17 00:00:00 2001 From: Michael Hirsch Date: Sun, 21 Nov 2021 14:14:38 -0500 Subject: [PATCH] lint --- src/CMakeLists.txt | 3 ++- src/tests/CMakeLists.txt | 28 ++++++++++++++++++---------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 817146a..503b2e3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 +) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index ba8b3a1..99818c4 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -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 $ - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) -set_tests_properties(nc4fortran:minimal PROPERTIES - FIXTURES_SETUP nclib - LABELS core) +add_test(NAME minimal COMMAND $ +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 "$<$:-Wno-compare-reals>") - add_test(NAME nc4fortran:${t} COMMAND $ 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()