use alternate way to incorporate the module via "include" in the source code

This commit is contained in:
Axel Kohlmeyer
2022-08-06 18:47:31 -04:00
parent 801d59a9ac
commit a9aa462a60
2 changed files with 4 additions and 1 deletions

View File

@ -29,7 +29,8 @@ if(CMAKE_Fortran_COMPILER)
add_library(flammps STATIC ${LAMMPS_FORTRAN_MODULE})
add_executable(test_fortran_create wrap_create.cpp test_fortran_create.f90)
target_link_libraries(test_fortran_create PRIVATE flammps lammps MPI::MPI_Fortran GTest::GTestMain)
target_link_libraries(test_fortran_create PRIVATE lammps MPI::MPI_Fortran GTest::GTestMain)
target_include_directories(test_fortran_create PRIVATE "${LAMMPS_SOURCE_DIR}/../fortran")
add_test(NAME FortranOpen COMMAND test_fortran_create)
add_executable(test_fortran_commands wrap_commands.cpp test_fortran_commands.f90)

View File

@ -1,3 +1,5 @@
include 'lammps.f90'
MODULE keepcreate
USE liblammps
TYPE(LAMMPS) :: lmp