[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Wanted: macro to hide code in a release build?
From: "Friedrich W. H. Kossebau" <kossebau () kde ! org>
Date: 2008-05-18 21:10:47
Message-ID: 200805182310.48478.kossebau () kde ! org
[Download RAW message or body]
Am Sonntag, 18. Mai 2008, um 21:58 Uhr, schrieb Friedrich W. H. Kossebau:
> Am Sonntag, 18. Mai 2008, um 21:34 Uhr, schrieb Chusslove Illich:
> > > [: Friedrich W. H. Kossebau :]
> > > But what macro can I use in the code?
> > >
> > > #ifdef ???
> > > mControllers.append( new VersionViewController(this) );
> > > #endif
> >
> > #ifndef NDEBUG ought to do it. NDEBUG is defined when
> > -DCMAKE_BUILD_TYPE=release is passed to cmake.
>
> So "#ifndef NDEBUG" is it for code.
> And "if( CMAKE_BUILD_TYPE_TOLOWER MATCHES release)" as eqivalent for
> CMakeLists.txt.
For the record:
The real equivalent is the one with a NOT before:
"if( NOT CMAKE_BUILD_TYPE_TOLOWER MATCHES release)"
Or just exchange the conditioned branches, as I did.
Friedrich
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic