scummvm random work
[patches.git] / cmake-utils.eclass.patch
CommitLineData
5e993f12 1--- cmake-utils.eclass 28 Sep 2008 18:52:16 -0000 1.10
2+++ cmake-utils.eclass 27 Oct 2008 05:36:02 -0000 1.12
3@@ -85,6 +85,10 @@ cmake-utils_has() { _use_me_now HAVE "$@
4 cmake-utils_src_configure() {
5 debug-print-function $FUNCNAME $*
6
7+ if ! has debug ${IUSE//+} || ! use debug ; then
8+ append-cppflags -DNDEBUG
9+ fi
10+
11 if [[ -n "${CMAKE_IN_SOURCE_BUILD}" ]]; then
12 cmake-utils_src_configurein
13 else
14@@ -141,11 +145,8 @@ cmake-utils_src_configureout() {
15 # Internal use only. Common configuration options for all types of builds.
16 _common_configure_code() {
17 local tmp_libdir=$(get_libdir)
18- if has debug ${IUSE//+} && use debug; then
19- echo -DCMAKE_BUILD_TYPE=Debug
20- else
21- echo -DCMAKE_BUILD_TYPE=Release
22- fi
23+ # CMAKE_BUILD_TYPE only modifies compiler flags, so set to None
24+ echo -DCMAKE_BUILD_TYPE=None
25 echo -DCMAKE_C_COMPILER=$(type -P $(tc-getCC))
26 echo -DCMAKE_CXX_COMPILER=$(type -P $(tc-getCXX))
27 echo -DCMAKE_INSTALL_PREFIX=${PREFIX:-/usr}