Create src/fortran_interface and add it to the cmake build
make sure to include the directory in src/CMakeLists.txt
create src/fortran_interface/CMakeLists.txt
Define a new cmake target similar to what is done here
call it fortran_interface, aliased with musica::fortran_interface
For the new target, you'll need to setup several properties like here.
crucially, this sets up the Fortran_MODULE_DIRECTORY so that the .mod files get copied to a place where other targets can find it
make a new cmake variable to allow someone to chose the module directory
Copy the fortran interface to the C functions to micm from here and put them in src/fortran_interface/some file
Acceptance criteria
a project can include musica::musica-fortran and use the c interface
Write a dockerfile that builds and install musica. Then, create a new cmake project that sets up a tiny fortran example that expects to use the musica::musica_fortran target. We should see the example files and the musica::musica_fortran target be compiled and a link against -lmusica in the compile output.
CMakeLists.txt
src/fortran_interface
and add it to the cmake buildsrc/CMakeLists.txt
src/fortran_interface/CMakeLists.txt
fortran_interface
, aliased withmusica::fortran_interface
Fortran_MODULE_DIRECTORY
so that the.mod
files get copied to a place where other targets can find itsrc/fortran_interface/some file
Acceptance criteria
a project can include musica::musica-fortran and use the c interface
Write a dockerfile that builds and install musica. Then, create a new cmake project that sets up a tiny fortran example that expects to use the
musica::musica_fortran
target. We should see the example files and themusica::musica_fortran
target be compiled and a link against-lmusica
in the compile output.