%cmake macro

Kacper Kornet kornet at camk.edu.pl
Thu Feb 3 18:55:48 CET 2011


On Thu, Feb 03, 2011 at 06:10:29PM +0100, Jakub Bogusz wrote:
> On Tue, Feb 01, 2011 at 07:51:42PM +0100, Kacper Kornet wrote:
> > 2. Change the build type we use to None. Then only CMAKE_C_FLAGS will be used

> > Flaws:
> > Same as above. But I don't know if any package redefines that variable
> > unconditionally.

> Some packages set build type to some value (mostly Release) if it's not
> specified/None.

I have only seen packages with condition:

if(NOT CMAKE_BUILD_TYPE)
  set(CMAKE_BUILD_TYPE "Release")
endif()

> > 3. Use or own build type like: cmake
> > -DCMAKE_C_FLAGS_PLD=""${CFLAGS:-%{rpmcflags}}"

> + "-DNDEBUG" I think

Why not put it to %optflags?

Another problem is where to put -DNO_QT_DEBUG for builds with Qt.

> > Flaws:
> > If a package uses some special options in release flags, i.e. to avoid debug
> > output, we would need to put them into our flags. 


> > I can implement the third solution. But first I am waiting for any objections
> > or better ideas.

> Needs some testing probably.

So far I have found, that at least in one package there is as build type
specified in .spec file.

> BTW, I mentioned this cmake issue on -devel-? list some months ago.

I have checked in the archive. It seems that you have similar idea
earlier than me.

-- 
  Kacper Kornet


More information about the pld-devel-en mailing list