Merge pull request #4344 from lammps/cmake-cpp-std-deprecation
Prepare development branch for requiring C++17 and deprecating GNU make support for some packages
This commit is contained in:
@ -3,6 +3,9 @@
|
|||||||
# CMake build system
|
# CMake build system
|
||||||
# This file is part of LAMMPS
|
# This file is part of LAMMPS
|
||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
if(CMAKE_VERSION VERSION_LESS 3.20)
|
||||||
|
message(WARNING "LAMMPS is planning to require at least CMake version 3.20 by Summer 2025. Please upgrade!")
|
||||||
|
endif()
|
||||||
########################################
|
########################################
|
||||||
# set policy to silence warnings about ignoring <PackageName>_ROOT but use it
|
# set policy to silence warnings about ignoring <PackageName>_ROOT but use it
|
||||||
if(POLICY CMP0074)
|
if(POLICY CMP0074)
|
||||||
@ -144,16 +147,28 @@ if((PKG_KOKKOS) AND (Kokkos_ENABLE_CUDA) AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL
|
|||||||
set(CMAKE_TUNE_DEFAULT "${CMAKE_TUNE_DEFAULT}" "-Xcudafe --diag_suppress=unrecognized_pragma,--diag_suppress=128")
|
set(CMAKE_TUNE_DEFAULT "${CMAKE_TUNE_DEFAULT}" "-Xcudafe --diag_suppress=unrecognized_pragma,--diag_suppress=128")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# we require C++11 without extensions. Kokkos requires at least C++17 (currently)
|
# we *require* C++11 without extensions but prefer C++17.
|
||||||
|
# Kokkos requires at least C++17 (currently)
|
||||||
if(NOT CMAKE_CXX_STANDARD)
|
if(NOT CMAKE_CXX_STANDARD)
|
||||||
|
if(cxx_std_17 IN_LIST CMAKE_CXX_COMPILE_FEATURES)
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
else()
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
if(CMAKE_CXX_STANDARD LESS 11)
|
if(CMAKE_CXX_STANDARD LESS 11)
|
||||||
message(FATAL_ERROR "C++ standard must be set to at least 11")
|
message(FATAL_ERROR "C++ standard must be set to at least 11")
|
||||||
endif()
|
endif()
|
||||||
|
if(CMAKE_CXX_STANDARD LESS 17)
|
||||||
|
message(WARNING "Selecting C++17 standard is preferred over C++${CMAKE_CXX_STANDARD}")
|
||||||
|
endif()
|
||||||
if(PKG_KOKKOS AND (CMAKE_CXX_STANDARD LESS 17))
|
if(PKG_KOKKOS AND (CMAKE_CXX_STANDARD LESS 17))
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
endif()
|
endif()
|
||||||
|
# turn off C++17 check in lmptype.h
|
||||||
|
if(LAMMPS_CXX11)
|
||||||
|
add_compile_definitions(LAMMPS_CXX11)
|
||||||
|
endif()
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Use compiler extensions")
|
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Use compiler extensions")
|
||||||
# ugly hacks for MSVC which by default always reports an old C++ standard in the __cplusplus macro
|
# ugly hacks for MSVC which by default always reports an old C++ standard in the __cplusplus macro
|
||||||
@ -347,6 +362,17 @@ foreach(PKG ${STANDARD_PACKAGES} ${SUFFIX_PACKAGES})
|
|||||||
option(PKG_${PKG} "Build ${PKG} Package" OFF)
|
option(PKG_${PKG} "Build ${PKG} Package" OFF)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
set(DEPRECATED_PACKAGES AWPMD ATC POEMS)
|
||||||
|
foreach(PKG ${DEPRECATED_PACKAGES})
|
||||||
|
if(PKG_${PKG})
|
||||||
|
message(WARNING
|
||||||
|
"The ${PKG} package will be removed from LAMMPS in Summer 2025 due to lack of "
|
||||||
|
"maintenance and use of code constructs that conflict with modern C++ compilers "
|
||||||
|
"and standards. Please contact developers@lammps.org if you have any concerns "
|
||||||
|
"about this step.")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
######################################################
|
######################################################
|
||||||
# packages with special compiler needs or external libs
|
# packages with special compiler needs or external libs
|
||||||
######################################################
|
######################################################
|
||||||
|
|||||||
@ -1,10 +1,14 @@
|
|||||||
Build LAMMPS
|
Build LAMMPS
|
||||||
============
|
============
|
||||||
|
|
||||||
LAMMPS is built as a library and an executable from source code using
|
LAMMPS is built as a library and an executable from source code using a
|
||||||
either traditional makefiles for use with GNU make (which may require
|
build environment generated by CMake (Unix Makefiles, Ninja, Xcode,
|
||||||
manual editing), or using a build environment generated by CMake (Unix
|
Visual Studio, KDevelop, CodeBlocks and more depending on the platform).
|
||||||
Makefiles, Ninja, Xcode, Visual Studio, KDevelop, CodeBlocks and more).
|
Using CMake is the preferred way to build LAMMPS. In addition, LAMMPS
|
||||||
|
can be compiled using the legacy build system based on traditional
|
||||||
|
makefiles for use with GNU make (which may require manual editing).
|
||||||
|
Support for the legacy build system is slowly being phased out and may
|
||||||
|
not be available for all optional features.
|
||||||
|
|
||||||
As an alternative, you can download a package with pre-built executables
|
As an alternative, you can download a package with pre-built executables
|
||||||
or automated build trees, as described in the :doc:`Install <Install>`
|
or automated build trees, as described in the :doc:`Install <Install>`
|
||||||
|
|||||||
@ -16,7 +16,7 @@ environments is on a :doc:`separate page <Howto_cmake>`.
|
|||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
LAMMPS currently requires that CMake version 3.16 or later is available.
|
LAMMPS currently requires that CMake version 3.20 or later is available.
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
@ -32,11 +32,11 @@ environments is on a :doc:`separate page <Howto_cmake>`.
|
|||||||
Advantages of using CMake
|
Advantages of using CMake
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
CMake is an alternative to compiling LAMMPS in the traditional way
|
CMake is the preferred way of compiling LAMMPS in contrast to the legacy
|
||||||
through :doc:`(manually customized) makefiles <Build_make>`. Using
|
build system based on GNU make and through :doc:`(manually customized)
|
||||||
CMake has multiple advantages that are specifically helpful for
|
makefiles <Build_make>`. Using CMake has multiple advantages that are
|
||||||
people with limited experience in compiling software or for people
|
specifically helpful for people with limited experience in compiling
|
||||||
that want to modify or extend LAMMPS.
|
software or for people that want to modify or extend LAMMPS.
|
||||||
|
|
||||||
- CMake can detect available hardware, tools, features, and libraries
|
- CMake can detect available hardware, tools, features, and libraries
|
||||||
and adapt the LAMMPS default build configuration accordingly.
|
and adapt the LAMMPS default build configuration accordingly.
|
||||||
|
|||||||
@ -8,6 +8,10 @@ Building LAMMPS with traditional makefiles requires that you have a
|
|||||||
for customizing your LAMMPS build with a number of global compilation
|
for customizing your LAMMPS build with a number of global compilation
|
||||||
options and features.
|
options and features.
|
||||||
|
|
||||||
|
This build system is slowly being phased out and may not support all
|
||||||
|
optional features and packages in LAMMPS. It is recommended to switch
|
||||||
|
to the :doc:`CMake based build system <Build_cmake>`.
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
^^^^^^^^^^^^
|
^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|||||||
@ -208,20 +208,21 @@ Build system (strict)
|
|||||||
|
|
||||||
LAMMPS currently supports two build systems: one that is based on
|
LAMMPS currently supports two build systems: one that is based on
|
||||||
:doc:`traditional Makefiles <Build_make>` and one that is based on
|
:doc:`traditional Makefiles <Build_make>` and one that is based on
|
||||||
:doc:`CMake <Build_cmake>`. Therefore, your contribution must be
|
:doc:`CMake <Build_cmake>`. As of fall 2024, it is no longer required
|
||||||
compatible with and support both build systems.
|
to support the traditional make build system. New packages may choose
|
||||||
|
to only support building with CMake. Additions to existing packages
|
||||||
|
must follow the requirements set by that package.
|
||||||
|
|
||||||
For a single pair of header and implementation files that are an
|
For a single pair of header and implementation files that are an
|
||||||
independent feature, it is usually only required to add them to
|
independent feature, it is usually only required to add them to
|
||||||
``src/.gitignore``.
|
``src/.gitignore``.
|
||||||
|
|
||||||
For traditional make, if your contributed files or package depend on
|
For traditional make, if your contributed files or package depend on
|
||||||
other LAMMPS style files or packages also being installed
|
other LAMMPS style files or packages also being installed (e.g. because
|
||||||
(e.g. because your file is a derived class from the other LAMMPS
|
your file is a derived class from the other LAMMPS class), then an
|
||||||
class), then an ``Install.sh`` file is also needed to check for those
|
``Install.sh`` file is also needed to check for those dependencies and
|
||||||
dependencies and modifications to ``src/Depend.sh`` to trigger the checks.
|
modifications to ``src/Depend.sh`` to trigger the checks. See other
|
||||||
See other README and Install.sh files in other directories as
|
README and Install.sh files in other directories as examples.
|
||||||
examples.
|
|
||||||
|
|
||||||
Similarly, for CMake support, changes may need to be made to
|
Similarly, for CMake support, changes may need to be made to
|
||||||
``cmake/CMakeLists.txt``, some of the files in ``cmake/presets``, and
|
``cmake/CMakeLists.txt``, some of the files in ``cmake/presets``, and
|
||||||
|
|||||||
@ -449,12 +449,6 @@ class PyLammps(object):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, name="", cmdargs=None, ptr=None, comm=None, verbose=False):
|
def __init__(self, name="", cmdargs=None, ptr=None, comm=None, verbose=False):
|
||||||
print("WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING")
|
|
||||||
print()
|
|
||||||
print("The PyLammps interface is deprecated and will be removed in future versions.")
|
|
||||||
print("Please use the lammps Python class instead.")
|
|
||||||
print()
|
|
||||||
print("WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING")
|
|
||||||
self.has_echo = False
|
self.has_echo = False
|
||||||
self.verbose = verbose
|
self.verbose = verbose
|
||||||
|
|
||||||
@ -476,6 +470,12 @@ class PyLammps(object):
|
|||||||
self.comm_nprocs = self.lmp.extract_setting("world_size")
|
self.comm_nprocs = self.lmp.extract_setting("world_size")
|
||||||
self.comm_me = self.lmp.extract_setting("world_rank")
|
self.comm_me = self.lmp.extract_setting("world_rank")
|
||||||
if self.comm_me == 0:
|
if self.comm_me == 0:
|
||||||
|
print("\nWARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING")
|
||||||
|
print("WARNING:")
|
||||||
|
print("WARNING: The PyLammps class is obsolete and will be removed from LAMMPS soon.")
|
||||||
|
print("WARNING: Please use the lammps Python class instead.")
|
||||||
|
print("WARNING:")
|
||||||
|
print("WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING\n")
|
||||||
print("LAMMPS output is captured by PyLammps wrapper")
|
print("LAMMPS output is captured by PyLammps wrapper")
|
||||||
if self.comm_nprocs > 1:
|
if self.comm_nprocs > 1:
|
||||||
print("WARNING: Using PyLammps with multiple MPI ranks is experimental. Not all functionality is supported.")
|
print("WARNING: Using PyLammps with multiple MPI ranks is experimental. Not all functionality is supported.")
|
||||||
|
|||||||
@ -9,6 +9,19 @@ mode=$1
|
|||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
|
||||||
|
The ATC package will be removed from LAMMPS in Summer 2025 due to lack of
|
||||||
|
maintenance and use of code constructs that conflict with modern C++ compilers
|
||||||
|
and standards. Please contact developers@lammps.org if you have any concerns
|
||||||
|
about this step.
|
||||||
|
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
EOF
|
||||||
|
|
||||||
action () {
|
action () {
|
||||||
if (test $mode = 0) then
|
if (test $mode = 0) then
|
||||||
rm -f ../$1
|
rm -f ../$1
|
||||||
|
|||||||
@ -9,6 +9,19 @@ mode=$1
|
|||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
|
||||||
|
The AWPMD package will be removed from LAMMPS in Summer 2025 due to lack of
|
||||||
|
maintenance and use of code constructs that conflict with modern C++ compilers
|
||||||
|
and standards. Please contact developers@lammps.org if you have any concerns
|
||||||
|
about this step.
|
||||||
|
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
EOF
|
||||||
|
|
||||||
action () {
|
action () {
|
||||||
if (test $mode = 0) then
|
if (test $mode = 0) then
|
||||||
rm -f ../$1
|
rm -f ../$1
|
||||||
|
|||||||
@ -9,6 +9,19 @@ mode=$1
|
|||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
|
||||||
|
Support for building the COLVARS package with the legacy build system using GNU
|
||||||
|
make will be removed in Summer 2025. Please switch to using CMake to build
|
||||||
|
LAMMPS as soon as possible and report any problems to developers@lammps.org
|
||||||
|
or post a bug report issue at https://github.com/lammps/lammps/issues
|
||||||
|
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
EOF
|
||||||
|
|
||||||
action () {
|
action () {
|
||||||
if (test $mode = 0) then
|
if (test $mode = 0) then
|
||||||
rm -f ../$1
|
rm -f ../$1
|
||||||
|
|||||||
@ -7,6 +7,19 @@ mode=$1
|
|||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
|
||||||
|
Support for building the COMPRESS package with the legacy build system using
|
||||||
|
GNU make will be removed in Summer 2025. Please switch to using CMake to build
|
||||||
|
LAMMPS as soon as possible and report any problems to developers@lammps.org
|
||||||
|
or post a bug report issue at https://github.com/lammps/lammps/issues
|
||||||
|
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
EOF
|
||||||
|
|
||||||
# arg1 = file, arg2 = file it depends on
|
# arg1 = file, arg2 = file it depends on
|
||||||
|
|
||||||
action () {
|
action () {
|
||||||
|
|||||||
@ -11,6 +11,19 @@ mode=$1
|
|||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
|
||||||
|
Support for building the ELECTRODE package with the legacy build system using
|
||||||
|
GNU make will be removed in Summer 2025. Please switch to using CMake to build
|
||||||
|
LAMMPS as soon as possible and report any problems to developers@lammps.org
|
||||||
|
or post a bug report issue at https://github.com/lammps/lammps/issues
|
||||||
|
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
EOF
|
||||||
|
|
||||||
# arg1 = file, arg2 = file it depends on
|
# arg1 = file, arg2 = file it depends on
|
||||||
|
|
||||||
action () {
|
action () {
|
||||||
|
|||||||
@ -7,6 +7,19 @@ mode=$1
|
|||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
|
||||||
|
Support for building the GPU package with the legacy build system using GNU
|
||||||
|
make will be removed in Summer 2025. Please switch to using CMake to build
|
||||||
|
LAMMPS as soon as possible and report any problems to developers@lammps.org
|
||||||
|
or post a bug report issue at https://github.com/lammps/lammps/issues
|
||||||
|
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
EOF
|
||||||
|
|
||||||
# arg1 = file, arg2 = file it depends on
|
# arg1 = file, arg2 = file it depends on
|
||||||
|
|
||||||
action () {
|
action () {
|
||||||
|
|||||||
@ -7,6 +7,19 @@ mode=$1
|
|||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
|
||||||
|
Support for building the KOKKOS package with the legacy build system using GNU
|
||||||
|
make will be removed in Summer 2025. Please switch to using CMake to build
|
||||||
|
LAMMPS as soon as possible and report any problems to developers@lammps.org
|
||||||
|
or post a bug report issue at https://github.com/lammps/lammps/issues
|
||||||
|
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
EOF
|
||||||
|
|
||||||
# arg1 = file, arg2 = file it depends on
|
# arg1 = file, arg2 = file it depends on
|
||||||
|
|
||||||
action () {
|
action () {
|
||||||
|
|||||||
@ -9,6 +9,19 @@ mode=$1
|
|||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
|
||||||
|
Support for building the LEPTON package with the legacy build system using GNU
|
||||||
|
make will be removed in Summer 2025. Please switch to using CMake to build
|
||||||
|
LAMMPS as soon as possible and report any problems to developers@lammps.org
|
||||||
|
or post a bug report issue at https://github.com/lammps/lammps/issues
|
||||||
|
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
EOF
|
||||||
|
|
||||||
action () {
|
action () {
|
||||||
if (test $mode = 0) then
|
if (test $mode = 0) then
|
||||||
rm -f ../$1
|
rm -f ../$1
|
||||||
|
|||||||
@ -7,12 +7,12 @@ SHELL = /bin/sh
|
|||||||
# specify flags and libraries needed for your compiler
|
# specify flags and libraries needed for your compiler
|
||||||
|
|
||||||
CC = mpicxx
|
CC = mpicxx
|
||||||
CCFLAGS = -g -O3 -std=c++11
|
CCFLAGS = -g -O3 # -std=c++17
|
||||||
SHFLAGS = -fPIC
|
SHFLAGS = -fPIC
|
||||||
DEPFLAGS = -M
|
DEPFLAGS = -M
|
||||||
|
|
||||||
LINK = mpicxx
|
LINK = mpicxx
|
||||||
LINKFLAGS = -g -O3 -std=c++11
|
LINKFLAGS = -g -O3 # -std=c++17
|
||||||
LIB =
|
LIB =
|
||||||
SIZE = size
|
SIZE = size
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ SHLIBFLAGS = -shared -rdynamic
|
|||||||
# LAMMPS ifdef settings
|
# LAMMPS ifdef settings
|
||||||
# see possible settings in Section 3.5 of the manual
|
# see possible settings in Section 3.5 of the manual
|
||||||
|
|
||||||
LMP_INC = -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 # -DLAMMPS_CXX98
|
LMP_INC = -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 # -DLAMMPS_CXX11
|
||||||
|
|
||||||
# MPI library
|
# MPI library
|
||||||
# see discussion in Section 3.4 of the manual
|
# see discussion in Section 3.4 of the manual
|
||||||
|
|||||||
@ -7,12 +7,12 @@ SHELL = /bin/sh
|
|||||||
# specify flags and libraries needed for your compiler
|
# specify flags and libraries needed for your compiler
|
||||||
|
|
||||||
CC = g++
|
CC = g++
|
||||||
CCFLAGS = -g -O3 -std=c++11
|
CCFLAGS = -g -O3 # -std=c++17
|
||||||
SHFLAGS = -fPIC
|
SHFLAGS = -fPIC
|
||||||
DEPFLAGS = -M
|
DEPFLAGS = -M
|
||||||
|
|
||||||
LINK = g++
|
LINK = g++
|
||||||
LINKFLAGS = -g -O -std=c++11
|
LINKFLAGS = -g -O # -std=c++17
|
||||||
LIB =
|
LIB =
|
||||||
SIZE = size
|
SIZE = size
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ SHLIBFLAGS = -shared -rdynamic
|
|||||||
# LAMMPS ifdef settings
|
# LAMMPS ifdef settings
|
||||||
# see possible settings in Section 3.5 of the manual
|
# see possible settings in Section 3.5 of the manual
|
||||||
|
|
||||||
LMP_INC = -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 # -DLAMMPS_CXX98
|
LMP_INC = -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 # -DLAMMPS_CXX11
|
||||||
|
|
||||||
# MPI library
|
# MPI library
|
||||||
# see discussion in Section 3.4 of the manual
|
# see discussion in Section 3.4 of the manual
|
||||||
|
|||||||
@ -7,6 +7,19 @@ mode=$1
|
|||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
|
||||||
|
Support for building the ML-POD package with the legacy build system using GNU
|
||||||
|
make will be removed in Summer 2025. Please switch to using CMake to build
|
||||||
|
LAMMPS as soon as possible and report any problems to developers@lammps.org
|
||||||
|
or post a bug report issue at https://github.com/lammps/lammps/issues
|
||||||
|
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
EOF
|
||||||
|
|
||||||
# arg1 = file, arg2 = file it depends on
|
# arg1 = file, arg2 = file it depends on
|
||||||
|
|
||||||
action () {
|
action () {
|
||||||
|
|||||||
@ -7,6 +7,19 @@ mode=$1
|
|||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
|
||||||
|
Support for building the PLUMED package with the legacy build system using GNU
|
||||||
|
make will be removed in Summer 2025. Please switch to using CMake to build
|
||||||
|
LAMMPS as soon as possible and report any problems to developers@lammps.org
|
||||||
|
or post a bug report issue at https://github.com/lammps/lammps/issues
|
||||||
|
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
EOF
|
||||||
|
|
||||||
# arg1 = file, arg2 = file it depends on
|
# arg1 = file, arg2 = file it depends on
|
||||||
|
|
||||||
action () {
|
action () {
|
||||||
|
|||||||
@ -9,6 +9,19 @@ mode=$1
|
|||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
|
||||||
|
The POEMS package will be removed from LAMMPS in Summer 2025 due to lack of
|
||||||
|
maintenance and use of code constructs that conflict with modern C++ compilers
|
||||||
|
and standards. Please contact developers@lammps.org if you have any concerns
|
||||||
|
about this step.
|
||||||
|
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
EOF
|
||||||
|
|
||||||
action () {
|
action () {
|
||||||
if (test $mode = 0) then
|
if (test $mode = 0) then
|
||||||
rm -f ../$1
|
rm -f ../$1
|
||||||
|
|||||||
@ -7,6 +7,19 @@ mode=$1
|
|||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
|
||||||
|
Support for building the VTK package with the legacy build system using GNU
|
||||||
|
make will be removed in Summer 2025. Please switch to using CMake to build
|
||||||
|
LAMMPS as soon as possible and report any problems to developers@lammps.org
|
||||||
|
or post a bug report issue at https://github.com/lammps/lammps/issues
|
||||||
|
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING-WARNING
|
||||||
|
EOF
|
||||||
|
|
||||||
# arg1 = file, arg2 = file it depends on
|
# arg1 = file, arg2 = file it depends on
|
||||||
|
|
||||||
action () {
|
action () {
|
||||||
|
|||||||
@ -34,6 +34,13 @@
|
|||||||
#error LAMMPS requires a C++11 (or later) compliant compiler. Enable C++11 compatibility or upgrade the compiler.
|
#error LAMMPS requires a C++11 (or later) compliant compiler. Enable C++11 compatibility or upgrade the compiler.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// C++17 check
|
||||||
|
#ifndef LAMMPS_CXX11
|
||||||
|
#if __cplusplus < 201703L
|
||||||
|
#error LAMMPS is planning to transition to requiring C++17. To disable this error please use a C++17 compliant compiler, enable C++17 support, or define -DLAMMPS_CXX11 in your makefile or when running cmake
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __STDC_LIMIT_MACROS
|
#ifndef __STDC_LIMIT_MACROS
|
||||||
#define __STDC_LIMIT_MACROS
|
#define __STDC_LIMIT_MACROS
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user