build system updates to skip fix neighbor/swap if VORONOI package is not installed

This commit is contained in:
Axel Kohlmeyer
2024-12-20 19:20:51 -05:00
parent c847ac1fd4
commit 49b2b978e6
3 changed files with 14 additions and 2 deletions

View File

@ -7,3 +7,13 @@ if(NOT PKG_MANYBODY)
list(REMOVE_ITEM LAMMPS_SOURCES ${LAMMPS_SOURCE_DIR}/MC/fix_sgcmc.cpp) list(REMOVE_ITEM LAMMPS_SOURCES ${LAMMPS_SOURCE_DIR}/MC/fix_sgcmc.cpp)
set_property(TARGET lammps PROPERTY SOURCES "${LAMMPS_SOURCES}") set_property(TARGET lammps PROPERTY SOURCES "${LAMMPS_SOURCES}")
endif() endif()
# fix neighbor/swap may only be installed if also the VORONOI package is installed
if(NOT PKG_VORONOI)
get_property(LAMMPS_FIX_HEADERS GLOBAL PROPERTY FIX)
list(REMOVE_ITEM LAMMPS_FIX_HEADERS ${LAMMPS_SOURCE_DIR}/MC/fix_neighbor_swap.h)
set_property(GLOBAL PROPERTY FIX "${LAMMPS_FIX_HEADERS}")
get_target_property(LAMMPS_SOURCES lammps SOURCES)
list(REMOVE_ITEM LAMMPS_SOURCES ${LAMMPS_SOURCE_DIR}/MC/fix_neighbor_swap.cpp)
set_property(TARGET lammps PROPERTY SOURCES "${LAMMPS_SOURCES}")
endif()

2
src/.gitignore vendored
View File

@ -912,6 +912,8 @@
/fix_msst.h /fix_msst.h
/fix_neb.cpp /fix_neb.cpp
/fix_neb.h /fix_neb.h
/fix_neighbor_swap.cpp
/fix_neighbor_swap.h
/fix_nh_asphere.cpp /fix_nh_asphere.cpp
/fix_nh_asphere.h /fix_nh_asphere.h
/fix_nph_asphere.cpp /fix_nph_asphere.cpp

View File

@ -51,8 +51,8 @@ action fix_charge_regulation.cpp
action fix_charge_regulation.h action fix_charge_regulation.h
action fix_gcmc.cpp action fix_gcmc.cpp
action fix_gcmc.h action fix_gcmc.h
action fix_neighbor_swap.cpp action fix_neighbor_swap.cpp compute_voronoi_atom.cpp
action fix_neighbor_swap.h action fix_neighbor_swap.h compute_voronoi_atom.h
action fix_mol_swap.cpp action fix_mol_swap.cpp
action fix_mol_swap.h action fix_mol_swap.h
action fix_sgcmc.cpp pair_eam.cpp action fix_sgcmc.cpp pair_eam.cpp