Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style
CMake adds -DNDEBUG with build types Release, MinSizeRel and RelWithDebInfo. NDEBUG disables assert(), which can improve performance.
This commit is contained in:
parent
3c46c0d201
commit
636336b1a7
1 changed files with 2 additions and 2 deletions
|
@ -63,8 +63,8 @@ _EOF
|
|||
cmake_args+=" -DCMAKE_INSTALL_SBINDIR=bin"
|
||||
|
||||
export CMAKE_GENERATOR="${CMAKE_GENERATOR:-Ninja}"
|
||||
# Override flags: https://gitlab.kitware.com/cmake/cmake/issues/19590
|
||||
CFLAGS="${CFLAGS/ -pipe / }" CXXFLAGS="${CXXFLAGS/ -pipe / }" \
|
||||
# Remove -pipe: https://gitlab.kitware.com/cmake/cmake/issues/19590
|
||||
CFLAGS="-DNDEBUG ${CFLAGS/ -pipe / }" CXXFLAGS="-DNDEBUG ${CXXFLAGS/ -pipe / }" \
|
||||
cmake ${cmake_args} ${configure_args} ${wrksrc}/${build_wrksrc}
|
||||
|
||||
# Replace -isystem with -I
|
||||
|
|
Loading…
Reference in a new issue