SPECS: cmake.spec - even more :/

Kacper Kornet kornet at camk.edu.pl
Thu Aug 7 01:36:13 CEST 2008


On Tue, Aug 05, 2008 at 05:40:30PM +0200, Arkadiusz Miskiewicz wrote:
> On Tuesday 05 August 2008, Kacper Kornet wrote:
> > On Thu, Jul 31, 2008 at 05:35:39PM +0200, Jakub Bogusz wrote:
> > > On Thu, Jul 31, 2008 at 09:54:25AM +0300, Elan Ruusamäe wrote:
> > > > On Thursday 31 July 2008 07:45, qboosh wrote:
> > > > > +# - rpmldflags/rpmcppflags are not passed through %%cmake macro at
> > > > > all +#   (is there any standard way???)

> > > > there isn't (this has gone over devel-en list already at least twice).

> > > Well, as I rechecked, at least cmake 2.6.0 respects LDFLAGS.
> > > But it's all - no CPPFLAGS.

> > > And use of any of predefined CMAKE_BUILD_TYPEs overrides
> > > CFLAGS/CXXFLAGS (-Os/-O2/-O3 is added _after_ flags taken from
> > > environment).

> > Can you check with the following definition of %cmake:

> > %cmake { \
> > CC="%{__cc}" \
> > CXX="%{__cxx}" \
> > %{__cmake} \
> >     -DCMAKE_BUILD_TYPE="Release" \
> >     -DCMAKE_C_FLAGS:STRING="%{rpmcflags}" \
> >     -DCMAKE_CXX_FLAGS_RELEASE:STRING="%{rpmcxxflags}" \
> >     -DCMAKE_EXE_LINKER_FLAGS_RELEASE:STRING="%{rpmldflags}" \
> >     -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \
> > }

> CPPFLAGS is missing

So CMAKE_CXX_FLAGS_RELEASE and CMAKE_C_FLAGS should also inlude
%{rpmcppflags}. Another soulutuion is to add to CMakeLists.txt 
line:
ADD_DEFINITIONS(%{rpmcppflags})

-- 
  Kacper Kornet


More information about the pld-devel-en mailing list