make ENABLE_ALL work out of the box

This commit is contained in:
Christoph Junghans 2017-07-20 15:15:29 -06:00
parent 427ca88dd4
commit c88d1e5510
1 changed files with 9 additions and 8 deletions

View File

@ -71,20 +71,21 @@ add_definitions(-DLAMMPS_MEMALIGN=${LAMMPS_MEMALIGN})
option(CMAKE_VERBOSE_MAKEFILE "Verbose makefile" OFF)
option(ENABLE_ALL "Build all packages" OFF)
set(PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GRANULAR
KIM KSPACE MANYBODY MC MEAM MISC MOLECULE MSCG MPIIO PERI POEMS PYTHON QEQ
REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
set(USER-PACKAGES USER-ATC USER-AWPMD USER-CGDNA
option(ENABLE_ALL "Build all default packages" OFF)
set(DEFAULT_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GRANULAR
KSPACE MANYBODY MC MEAM MISC MOLECULE PERI QEQ
REAX REPLICA RIGID SHOCK SNAP SRD)
set(OTHER_PACKAGES KIM PYTHON MSCG MPIIO VORONOI POEMS
USER-ATC USER-AWPMD USER-CGDNA
USER-CGSDK USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF
USER-FEP USER-H5MD USER-LB USER-MANIFOLD USER-MEAMC USER-MGPT USER-MISC
USER-MOLFILE USER-NETCDF USER-PHONON USER-QTB USER-REAXC USER-SMD
USER-SMTBQ USER-SPH USER-TALLY USER-VTK USER-QUIP USER-QMMM)
set(ACCEL_PACKAGES USER-OMP KOKKOS OPT USER-INTEL GPU)
foreach(PKG ${PACKAGES})
foreach(PKG ${DEFAULT_PACKAGES})
option(ENABLE_${PKG} "Build ${PKG} Package" ${ENABLE_ALL})
endforeach()
foreach(PKG ${ACCEL_PACKAGES} ${USER-PACKAGES})
foreach(PKG ${ACCEL_PACKAGES} ${OTHER_PACKAGES})
option(ENABLE_${PKG} "Build ${PKG} Package" OFF)
endforeach()
@ -522,7 +523,7 @@ install(TARGETS lmp DESTINATION ${CMAKE_INSTALL_BINDIR})
##################################
# Print package summary
##################################
foreach(PKG ${PACKAGES} ${USER-PACKAGES} ${ACCEL_PACKAGES})
foreach(PKG ${DEFAULT_PACKAGES} ${OTHER_PACKAGES} ${ACCEL_PACKAGES})
if(ENABLE_${PKG})
message(STATUS "Building package: ${PKG}")
endif()