Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 622358 - cmake-utils.eclass: -DNDEBUG is ignored by cmake
Summary: cmake-utils.eclass: -DNDEBUG is ignored by cmake
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-20 21:27 UTC by Eugene Shalygin
Modified: 2017-07-09 13:45 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Shalygin 2017-06-20 21:27:57 UTC
cmake-utils.eclass tries to pass -DNDEBUG via CPPFLAGS environment variable, but CMake ignores it (https://cmake.org/Bug/view.php?id=12928).
Comment 1 Michael Palimaka (kensington) gentoo-dev 2017-06-24 04:03:51 UTC
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