build system support: fix sgcmc may only be compiled if EAM is available
This commit is contained in:
@ -668,7 +668,7 @@ endif()
|
|||||||
# packages which selectively include variants based on enabled styles
|
# packages which selectively include variants based on enabled styles
|
||||||
# e.g. accelerator packages
|
# e.g. accelerator packages
|
||||||
######################################################################
|
######################################################################
|
||||||
foreach(PKG_WITH_INCL CORESHELL DPD-SMOOTH MISC PHONON QEQ OPENMP KOKKOS OPT INTEL GPU)
|
foreach(PKG_WITH_INCL CORESHELL DPD-SMOOTH MC MISC PHONON QEQ OPENMP KOKKOS OPT INTEL GPU)
|
||||||
if(PKG_${PKG_WITH_INCL})
|
if(PKG_${PKG_WITH_INCL})
|
||||||
include(Packages/${PKG_WITH_INCL})
|
include(Packages/${PKG_WITH_INCL})
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
9
cmake/Modules/Packages/MC.cmake
Normal file
9
cmake/Modules/Packages/MC.cmake
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# fix sgcmc may only be installed if also the EAM pair style from MANYBODY is installed
|
||||||
|
if(NOT PKG_MANYBODY)
|
||||||
|
get_property(LAMMPS_FIX_HEADERS GLOBAL PROPERTY FIX)
|
||||||
|
list(REMOVE_ITEM LAMMPS_FIX_HEADERS ${LAMMPS_SOURCE_DIR}/MC/fix_sgcmc.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_sgcmc.cpp)
|
||||||
|
set_property(TARGET lammps PROPERTY SOURCES "${LAMMPS_SOURCES}")
|
||||||
|
endif()
|
||||||
2
src/.gitignore
vendored
2
src/.gitignore
vendored
@ -920,6 +920,8 @@
|
|||||||
/fix_rigid_nvt_small.h
|
/fix_rigid_nvt_small.h
|
||||||
/fix_rigid_small.cpp
|
/fix_rigid_small.cpp
|
||||||
/fix_rigid_small.h
|
/fix_rigid_small.h
|
||||||
|
/fix_sgcmc.cpp
|
||||||
|
/fix_sgcmc.h
|
||||||
/fix_shake.cpp
|
/fix_shake.cpp
|
||||||
/fix_shake.h
|
/fix_shake.h
|
||||||
/fix_shardlow.cpp
|
/fix_shardlow.cpp
|
||||||
|
|||||||
63
src/MC/Install.sh
Executable file
63
src/MC/Install.sh
Executable file
@ -0,0 +1,63 @@
|
|||||||
|
# Install/unInstall package files in LAMMPS
|
||||||
|
# mode = 0/1/2 for uninstall/install/update
|
||||||
|
|
||||||
|
# this is default Install.sh for all packages
|
||||||
|
# if package has an auxiliary library or a file with a dependency,
|
||||||
|
# then package dir has its own customized Install.sh
|
||||||
|
|
||||||
|
mode=$1
|
||||||
|
|
||||||
|
# enforce using portable C locale
|
||||||
|
LC_ALL=C
|
||||||
|
export LC_ALL
|
||||||
|
|
||||||
|
# arg1 = file, arg2 = file it depends on
|
||||||
|
|
||||||
|
action () {
|
||||||
|
if (test $mode = 0) then
|
||||||
|
rm -f ../$1
|
||||||
|
elif (! cmp -s $1 ../$1) then
|
||||||
|
if (test -z "$2" || test -e ../$2) then
|
||||||
|
cp $1 ..
|
||||||
|
if (test $mode = 2) then
|
||||||
|
echo " updating src/$1"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
elif (test -n "$2") then
|
||||||
|
if (test ! -e ../$2) then
|
||||||
|
rm -f ../$1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# all package files with no dependencies
|
||||||
|
|
||||||
|
for file in *.cpp *.h; do
|
||||||
|
test -f ${file} && action $file
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
action fix_atom_swap.cpp
|
||||||
|
action fix_atom_swap.h
|
||||||
|
action fix_bond_break.cpp
|
||||||
|
action fix_bond_break.h
|
||||||
|
action fix_bond_create_angle.cpp
|
||||||
|
action fix_bond_create_angle.h
|
||||||
|
action fix_bond_create.cpp
|
||||||
|
action fix_bond_create.h
|
||||||
|
action fix_bond_swap.cpp
|
||||||
|
action fix_bond_swap.h
|
||||||
|
action fix_charge_regulation.cpp
|
||||||
|
action fix_charge_regulation.h
|
||||||
|
action fix_gcmc.cpp
|
||||||
|
action fix_gcmc.h
|
||||||
|
action fix_mol_swap.cpp
|
||||||
|
action fix_mol_swap.h
|
||||||
|
action fix_sgcmc.cpp pair_eam.cpp
|
||||||
|
action fix_sgcmc.h pair_eam.h
|
||||||
|
action fix_tfmc.cpp
|
||||||
|
action fix_tfmc.h
|
||||||
|
action fix_widom.cpp
|
||||||
|
action fix_widom.h
|
||||||
|
action pair_dsmc.cpp
|
||||||
|
action pair_dsmc.h
|
||||||
Reference in New Issue
Block a user