mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-28 14:15:19 -04:00
Change CMAKE_BUILD_TYPE for SIRIUS
SIRIUS_DBG and SIRIUS_OPT are not really considered by CMake and rather the CMAKE_BUILD_TYPE matters. The CMAKE_BUILD_TYPEs "Release" and "RelWithDebInfo" employ -O3/-O2, but already -O2 makes the SIRIUS build quite memory and time intensive. We are primarily interested here in testing SIRIUS with CP2K and thus use CMAKE_BUILD_TYPE "Debug" for testing.
This commit is contained in:
parent
69bb5539cc
commit
7fb402190f
1 changed files with 13 additions and 2 deletions
|
|
@ -83,8 +83,19 @@ case "$with_sirius" in
|
|||
fi
|
||||
|
||||
if [ "$ARCH" = "x86_64" ]; then
|
||||
SIRIUS_OPT="-O3 -DNDEBUG -mtune=native -ftree-loop-vectorize ${MATH_CFLAGS}"
|
||||
SIRIUS_DBG="-O2 -g -mtune=native -ftree-loop-vectorize ${MATH_CFLAGS}"
|
||||
if [ "${with_intel}" != "__DONTUSE__" ]; then
|
||||
SIRIUS_OPT="-DNDEBUG -O2 -g ${MATH_CFLAGS}"
|
||||
SIRIUS_DBG="-O1 -g ${MATH_CFLAGS}"
|
||||
# SIRIUS_DBG and SIRIUS_OPT are not really considered by CMake and rather the CMAKE_BUILD_TYPE matters.
|
||||
# The CMAKE_BUILD_TYPEs "Release" and "RelWithDebInfo" employ -O3/-O2, but already -O2 makes the SIRIUS
|
||||
# build quite memory and time intensive. We are primarily interested here in testing SIRIUS with CP2K
|
||||
# and thus use CMAKE_BUILD_TYPE "Debug" for testing. Switch the lines below for production.
|
||||
# EXTRA_CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS= ${EXTRA_CMAKE_FLAGS}"
|
||||
EXTRA_CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS= ${EXTRA_CMAKE_FLAGS}"
|
||||
else
|
||||
SIRIUS_OPT="-O3 -DNDEBUG -mtune=native -ftree-loop-vectorize ${MATH_CFLAGS}"
|
||||
SIRIUS_DBG="-O2 -g -mtune=native -ftree-loop-vectorize ${MATH_CFLAGS}"
|
||||
fi
|
||||
fi
|
||||
|
||||
pkg_install_dir="${INSTALLDIR}/sirius-${sirius_ver}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue