-
Notifications
You must be signed in to change notification settings - Fork 2
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
4 changed files
with
49 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
cmake_minimum_required(VERSION 3.21) | ||
|
||
project( | ||
test_musica_fortran | ||
LANGUAGES Fortran C CXX | ||
) | ||
|
||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) | ||
|
||
include(FetchContent) | ||
|
||
FetchContent_Declare(musica-fortran | ||
GIT_REPOSITORY https://github.com/NCAR/musica.git | ||
GIT_TAG main | ||
) | ||
|
||
set(MUSICA_BUILD_C_CXX_INTERFACE OFF) | ||
set(MUSICA_BUILD_FORTRAN_INTERFACE ON) | ||
set(MUSICA_ENABLE_MICM ON) | ||
set(MUSICA_ENABLE_TUVX OFF) | ||
set(MUSICA_ENABLE_TESTS OFF) | ||
|
||
FetchContent_MakeAvailable(musica-fortran) | ||
|
||
find_package(PkgConfig REQUIRED) | ||
pkg_check_modules(netcdff IMPORTED_TARGET REQUIRED netcdf-fortran) | ||
|
||
enable_testing() | ||
|
||
# API Test | ||
add_executable(test_micm_core_api test_micm_api.F90) | ||
|
||
target_link_libraries(test_micm_fort_api | ||
PRIVATE | ||
musica::musica-fortran | ||
) | ||
|
||
set_target_properties(test_micm_fort_api | ||
PROPERTIES | ||
LINKER_LANGUAGE Fortran | ||
) | ||
|
||
add_test( | ||
NAME test_micm_fort_api | ||
COMMAND $<TARGET_FILE:test_micm_fort_api> | ||
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} | ||
) |
File renamed without changes.
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