add support for loading run and min styles

This commit is contained in:
Axel Kohlmeyer
2025-06-11 00:33:44 -04:00
parent b3f160c118
commit 464b9f4b03
8 changed files with 771 additions and 7 deletions

View File

@ -94,7 +94,10 @@ add_library(zero2plugin MODULE zero2plugin.cpp pair_zero2.cpp bond_zero2.cpp
angle_zero2.cpp dihedral_zero2.cpp improper_zero2.cpp)
target_link_libraries(zero2plugin PRIVATE lammps)
set_target_properties(morse2plugin nve2plugin helloplugin zero2plugin PROPERTIES PREFIX "" SUFFIX ".so")
add_library(runminplugin MODULE runminplugin.cpp min_cg2.cpp verlet2.cpp)
target_link_libraries(runminplugin PRIVATE lammps)
set_target_properties(morse2plugin nve2plugin helloplugin zero2plugin runminplugin PROPERTIES PREFIX "" SUFFIX ".so")
# MacOS seems to need this
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
@ -105,13 +108,13 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
set_target_properties(morse2plugin nve2plugin helloplugin zero2plugin
PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
if(CMAKE_CROSSCOMPILING)
set_target_properties(morse2plugin nve2plugin helloplugin zero2plugin
set_target_properties(morse2plugin nve2plugin helloplugin zero2plugin runminplugin
PROPERTIES LINK_FLAGS "-Wl,--export-all-symbols")
endif()
else()
set_target_properties(morse2plugin nve2plugin helloplugin zero2plugin PROPERTIES
set_target_properties(morse2plugin nve2plugin helloplugin zero2plugin runminplugin PROPERTIES
LINK_FLAGS "-rdynamic")
endif()
add_custom_target(plugins ALL ${CMAKE_COMMAND} -E echo "Building Plugins"
DEPENDS morse2plugin nve2plugin helloplugin zero2plugin morse2plugin)
DEPENDS morse2plugin nve2plugin helloplugin zero2plugin morse2plugin runminplugin)