cmake-utils.eclass tries to pass -DNDEBUG via CPPFLAGS environment variable, but CMake ignores it (https://cmake.org/Bug/view.php?id=12928).
Is there a certain package for which this is not working for you? We explicitly inject CPPFLAGS: https://gitweb.gentoo.org/repo/gentoo.git/tree/eclass/cmake-utils.eclass#n498 and I can see it building eg. kcalc: [ 96%] Building CXX object CMakeFiles/kcalc.dir/kcalc_dummy.cpp.o /usr/bin/x86_64-pc-linux-gnu-g++ -DKCOREADDONS_LIB -DKGUIADDONS_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT_WIDGETS_LIB -DQT_XML_LIB -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/var/tmp/portage/kde-apps/kcalc-16.12.3/work/kcalc-16.12.3_build -I/var/tmp/portage/kde-apps/kcalc-16.12.3/work/kcalc-16.12.3 -I/var/tmp/portage/kde-apps/kcalc-16.12.3/work/kcalc-16.12.3/knumber -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/KF5/KConfigWidgets -isystem /usr/include/KF5 -isystem /usr/include/KF5/KCodecs -isystem /usr/include/KF5/KWidgetsAddons -isystem /usr/include/KF5/KConfigGui -isystem /usr/include/qt5/QtXml -isystem /usr/include/KF5/KConfigCore -isystem /usr/include/KF5/KAuth -isystem /usr/include/KF5/KCoreAddons -isystem /usr/include/KF5/KGuiAddons -isystem /usr/include/KF5/KI18n -isystem /usr/include/KF5/KNotifications -isystem /usr/include/KF5/KXmlGui -isystem /usr/include/qt5/QtDBus -DQT_NO_DEBUG -DNDEBUG -march=native -O2 -pipe -std=c++0x -fno-operator-names -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Wvla -Wdate-time -fexceptions -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -std=gnu++11 -o CMakeFiles/kcalc.dir/kcalc_dummy.cpp.o -c /var/tmp/portage/kde-apps/kcalc-16.12.3/work/kcalc-16.12.3_build/kcalc_dummy.cpp