-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
20 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |