fix: define type of build
Purpose
Make sure that -DNDEBUG is defined.
What it solved
If type of build is not defined, CMake enable optimization but do not define -DNDEBUG as it does in Release or ReleaseWithDebug.
The library heavily rely on -DNDEBUG and enable some feature designed only for debug such as deadlock detector. This feature must track each lock operation to determine order of locking which have significant impact on performance. What more it can abort application.
See https://abseil.io/docs/cpp/guides/synchronization#deadlock-detection
Deadlock Detection
... Note that deadlock detection introduces significant overhead; it should not be enabled in production binaries.
It related to these issues, which is Linux specific:
Diffrecies
CMAKE_BUILD_TYPE=NONE
[ 26%] Building CXX object absl/synchronization/CMakeFiles/synchronization.dir/mutex.cc.o
cd /workspace/salsa/abseil/static/absl/synchronization && /usr/bin/c++ -I/workspace/salsa/abseil -g -O2 -ffile-prefix-map=/workspace/salsa/abseil=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++17 -Wall -Wextra -Wcast-qual -Wconversion-null -Wformat-security -Wmissing-declarations -Wnon-virtual-dtor -Woverlength-strings -Wpointer-arith -Wundef -Wunused-local-typedefs -Wunused-result -Wvarargs -Wvla -Wwrite-strings -DNOMINMAX -MD -MT absl/synchronization/CMakeFiles/synchronization.dir/mutex.cc.o -MF CMakeFiles/synchronization.dir/mutex.cc.o.d -o CMakeFiles/synchronization.dir/mutex.cc.o -c /workspace/salsa/abseil/absl/synchronization/mutex.cc
vs CMAKE_BUILD_TYPE=RELWITHDEBINFO (-g and -O2 as in NONE)
[ 26%] Building CXX object absl/synchronization/CMakeFiles/synchronization.dir/mutex.cc.o
cd /workspace/salsa/abseil/static/absl/synchronization && /usr/bin/c++ -I/workspace/salsa/abseil -g -O2 -ffile-prefix-map=/workspace/salsa/abseil=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -g -DNDEBUG -std=gnu++17 -Wall -Wextra -Wcast-qual -Wconversion-null -Wformat-security -Wmissing-declarations -Wnon-virtual-dtor -Woverlength-strings -Wpointer-arith -Wundef -Wunused-local-typedefs -Wunused-result -Wvarargs -Wvla -Wwrite-strings -DNOMINMAX -MD -MT absl/synchronization/CMakeFiles/synchronization.dir/mutex.cc.o -MF CMakeFiles/synchronization.dir/mutex.cc.o.d -o CMakeFiles/synchronization.dir/mutex.cc.o -c /workspace/salsa/abseil/absl/synchronization/mutex.cc
and package
--- libabsl-dev.txt 2025-10-03 19:09:04.510651934 +0200
+++ libabsl-dev2.txt 2025-10-03 20:02:07.094765229 +0200
@@ -369,22 +410,30 @@
/usr/lib/x86_64-linux-gnu/cmake/absl/abslConfig.cmake
/usr/lib/x86_64-linux-gnu/cmake/absl/abslConfigVersion.cmake
-/usr/lib/x86_64-linux-gnu/cmake/absl/abslTargets-none.cmake
+/usr/lib/x86_64-linux-gnu/cmake/absl/abslTargets-relwithdebinfo.cmake
/usr/lib/x86_64-linux-gnu/cmake/absl/abslTargets.cmake
/usr/lib/x86_64-linux-gnu/libabsl_atomic_hook_test_helper.a
/usr/lib/x86_64-linux-gnu/libabsl_bad_any_cast_impl.a
@@ -808,7 +858,12 @@
/usr/lib/x86_64-linux-gnu/pkgconfig/absl_variant.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/absl_vlog_config_internal.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/absl_vlog_is_on.pc
alternative we can only define -DNDEBUG.