On 09/08/2011 06:54 AM, Modestas Vainius wrote:
> Hello,
>
> On trečiadienis 07 Rugsėjis 2011 15:07:21 Matthias Klose wrote:
>> On 09/04/2011 08:17 AM, Modestas Vainius wrote:
>>> Debian packages should use "RelWithDebInfo" [1] CMAKE_BUILD_TYPE if they
>>> want settings compatible with Debian Policy out-of-the-box. However,
>>> neither "Release" [2] nor "RelWithDebInfo" [1] are defaults while empty
>>> build type [3] is THE default. So cmake makes absolutely NO decision on
>>> behalf of maintainer. Environment variables C(XX)FLAGS are still
>>> effective with empty build type so the process (including noopt
>>> handling) can be exactly the same as with autoconf. Closing as invalid.
>>>
>>> [1] set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
>>> [2] set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
>>> [3] set(CMAKE_${lang}_FLAGS_INIT "")
>>
>> Now setting "RelWithDebInfo" has the effect that the CFLAGS set in the
>> environment are ignored/overwritten with the hard coded flags. Is this
>> really intended?
>>
>> DEB_CFLAGS_APPEND="-O3 -D__DEBIAN_FOO__" DH_VERBOSE=1 dpkg-buildpackage ...
>> [...]
>> gcc ... -g -O2 -O3 -D__DEBIAN_FOO__ -w -O2 -g
>
> Do not set any build type if you don't want cmake messing with CFLAGS. Simple
> as that.
>
> Imagine build type as a user-friendly name for a certain collection of build
> flags. If you don't want this, don't set it.
then please document it, that it ignores/overwrites dpkg-buildflags. see
#552688 for the background. A README.Debian wouldn't hurt.
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]