packages: taglib/taglib.spec - add build type

Bartosz Świątek shadzik w gmail.com
Pią, 2 Paź 2009, 08:51:40 CEST


W dniu 2 października 2009 07:27 użytkownik Jakub Bogusz
<qboosh w pld-linux.org> napisał:
> On Thu, Oct 01, 2009 at 04:43:38PM +0200, Jakub Bogusz wrote:
>> On Thu, Sep 24, 2009 at 09:50:22PM +0200, cactus wrote:
>> > Author: cactus                       Date: Thu Sep 24 19:50:22 2009 GMT
>> > Module: packages                      Tag: HEAD
>> > ---- Log message:
>> > - add build type
>>
>> >  %cmake \
>> >     -DCMAKE_INSTALL_PREFIX=%{_prefix} \
>> >     -DLIB_INSTALL_DIR=%{_libdir} \
>> > +   -DCMAKE_BUILD_TYPE=%{!?debug:Release}%{?debug:Debug} \
>>
>> CMAKE_BUILD_TYPE=Release causes cmake to override our optflags by
>> cmake-defined ones; particularly - by -O3, which causes code to be
>> bigger (because of more aggressive inlining), and thus - in larger
>> projects - possibly slower due to more code cache misses.
>
> Some solutions to choose from:
>
> - add "PLDRelease" build type to cmake, which just adds "-DNDEBUG" to
>  passed optflags (and use it instead of Release)
>
> - use Release builds, but pass -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG"
>  (and -DCMAKE_C_FLAGS_RELEASE for C code) to avoid adding -O3 globally
>
> - use "None" builds, but add -DNDEBUG to flags somehow
>

Great. I'll do it as soon as I get to. The first option seems to be
the simpliest one.


-- 
"I'm living proof if you do one thing right in your career, you can
coast for a long time. A LOOOOONG time." -Guy Kawasaki


Więcej informacji o liście dyskusyjnej pld-devel-pl