Dne Ne 11. srpna 2013 15:47:18, Jan Engelhardt napsal(a):
On Sunday 2013-08-11 14:27, Tomáš Chvátal wrote:
I got quite bored by fixing issues one by one adjusting spec files wrt cmake usage. Thus I went out and wrote cmake.macros for our beloved cmake and put it into my home project [1].
Basically now you just call %cmake -Dmydef=on -Dsomethingelselocal=/var/ instead of having to fiddle with all the variables yourself.
Have you attempted using -DCMAKE_C_FLAGS_RELEASE:STRING="%optflags"?
That might in theory work, but the best we thought up for gentoo was to create
own target because this always caused some issues.
Basically you put there something like
-DCMAKE_USER_MAKE_RULES_OVERRIDE="/path/opensuse.cmake"
And then override whole set.
What I wrote in Gentoo:
local build_rules=${BUILD_DIR}/gentoo_rules.cmake
cat > "${build_rules}" <<- _EOF_
SET (CMAKE_AR $(type -P $(tc-getAR)) CACHE FILEPATH "Archive
manager" FORCE)
SET (CMAKE_ASM_COMPILE_OBJECT "