[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dh: default cmake options overridden



It seems that, instead of the suggestion originally posted in [1],
Debian's default CMake setting is `-DCMAKE_BUILD_TYPE=None`, and the
specific flags are controlled by the environment variables (CFLAGS and
friends).

Now, Debian policy [2] advocates `-O2 -g -Wall` for compiling.
Somehow, though, those flags don't end up on my compile lines [3].

How could I best debug this (through debian/rules, maybe)?

Cheers,
Nico

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=701233
[2] https://www.debian.org/doc/debian-policy/ch-files.html#s-binaries
[3] https://launchpadlibrarian.net/177295900/buildlog_ubuntu-utopic-amd64.netcdf_1%3A4.3.3~20140610-utopic1_UPLOADING.txt.gz

On Tue, Jun 10, 2014 at 7:51 PM, Nico Schlömer <nico.schloemer@gmail.com> wrote:
> Hi all,
>
> if I understand correctly from [1], the default CMAKE_BUILD_TYPE used
> by dh should be RelWithDebInfo. I found that, when
> override_dh_auto_configure is not empty in debian/rules, e.g,
>
> override_dh_auto_configure:
>   dh_auto_configure -- \
>   -DCMAKE_SKIP_RPATH:BOOL=ON
>   -DENABLE_TESTS:BOOL=OFF
>
> the build type setting is discarded as well. Manually adding
>
>   -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
>
> helps of course.
>
> Is that something that is expected and intended? Are there other
> default flags that need to be added, or is there a way to add CMake
> variables without disturbing unrelated default settings?
>
> Cheers,
> Nico
>
>
>
>
> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=701233


Reply to: