Dnia 2011-04-22, pią o godzinie 13:42 +0200, Pavol Rusnak pisze:
On 22/04/11 12:54, Adam Mizerski wrote:
Hi,
I have problem with passing arguments to cmake. In spec in %build section I have: cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_FLAGS_RELEASE="%{optflags} -DNDEBUG" \ -DCMAKE_CXX_FLAGS_RELEASE="%{optflags} -DNDEBUG" As I tried locally on my machine (just normal, not osc build) it works as expected.
But when running in osc build it is converted to: cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Release \ '-DCMAKE_C_FLAGS_RELEASE=-fbla -fbla -fbla -f... -DNDEBUG' \ '-DCMAKE_CXX_FLAGS_RELEASE=-fbla -fbla -fbla -f... -DNDEBUG' (that's how it looks like in compilation log) and it's not working. The build type is changed to Release, but flags are unchanged.
Is it bug in cmake or osc build? What to do with that? Thanks for any help.
You have -DCMAKE_BUILD_TYPE=Release in both snippets. If it's just a typo please post a link to your specfile in OBS ...
-- Best Regards / S pozdravom,
Pavol RUSNAK SUSE LINUX, s.r.o openSUSE Boosters Team Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9 prusnak[at]opensuse.org Czech Republic
With -DCMAKE_BUILD_TYPE=RELEASE it isn't working either. https://build.opensuse.org/package/show?package=synergy&project=home% 3AetamPL%3Abranches%3AX11%3AUtilities I've added -LA to show cmake's variables. CMAKE_C_FLAGS_RELEASE is still default "-O3 -DNDEBUG". -- Adam Mizerski