CMake has several build types, and (I think that appeared in 2.6.1) adds stuff to {C,CXX}FLAGS depending on buildtype. From /usr/local/share/cmake/Modules/Platform/gcc.cmake: SET (CMAKE_C_FLAGS_INIT "") SET (CMAKE_C_FLAGS_DEBUG_INIT "-g") SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") SET (CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") Currently, buildtype is set to Release, so `-O3 -DNDEBUG' is unconditionally added to cflags, which is, of course, very bad. Thus, hardcode CMAKE_BUILD_TYPE to "", so cmake doesn't ever tamper with cflags set by the ports system.
> >Synopsis: [PATCH] bsd.cmake.mk: set CMAKE_BUILD_TYPE to "" Improved patch: also remove no longer needed comment. --- bsd.cmake.mk.patch begins here --- Index: bsd.cmake.mk =================================================================== RCS file: /home/pcvs/ports/Mk/bsd.cmake.mk,v retrieving revision 1.2 diff -u -r1.2 bsd.cmake.mk --- bsd.cmake.mk 10 Aug 2008 15:43:46 -0000 1.2 +++ bsd.cmake.mk 13 Aug 2008 15:56:54 -0000 @@ -10,8 +10,6 @@ # CMAKE_USE_PTHREAD - Instruct cmake to use pthreads when # compiling/linking # Default: not set -# CMAKE_BUILD_TYPE - Type of build (release, debug) -# Default: Release # CMAKE_VERBOSE - Verbose build # Default: not set # CMAKE_SOURCE_PATH - Path to sourcedir for cmake @@ -47,12 +45,11 @@ -DCMAKE_C_FLAGS:STRING="${CFLAGS}" \ -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \ -DCMAKE_INSTALL_PREFIX:PATH="${CMAKE_INSTALL_PREFIX}" \ - -DCMAKE_BUILD_TYPE:STRING="${CMAKE_BUILD_TYPE}" + -DCMAKE_BUILD_TYPE:STRING="" # # Default build type and sourcedir # -CMAKE_BUILD_TYPE?= Release CMAKE_SOURCE_PATH?= . CMAKE_INSTALL_PREFIX?= ${PREFIX} --- bsd.cmake.mk.patch ends here --- -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://www.amdmi3.ru
Responsible Changed From-To: freebsd-ports-bugs->kde bsd.cmake.mk is kde territory (via the GNATS Auto Assign Tool)
State Changed From-To: open->patched patched in area51.
miwi 2009-01-30 19:25:22 UTC FreeBSD ports repository Modified files: Mk bsd.cmake.mk devel/cmake Makefile distinfo pkg-plist x11/qimageblitz Makefile Log: - Update to 2.6.2 - Remove CMAKE_BUILD_TYPE [1] CMAKE_BUILD_TYPE only affects compiler FLAGS and linking with specific library versions (debug |optimized | general). In our case external libraries reside in other ports and only install one version (no separate debug/optimized). Also, the ports system provide correct compiler flags (-g and no optimizations when WITH_DEBUG is used). Thus, cmake buildtypes only add extra compiler flags. Ports will be built correctly both by default and for WITH_DEBUG case. - Also, change WRKSRC to CONFIGURE_WRKSRC. (use CONFIGURE_WRKSRC for configure target instead of WRKSRC) PR: 126507 [1] Submitted by: amdmi3@ [1] Tested with: exp-run Thanks to: pav/amdmi3 Revision Changes Path 1.3 +7 -10 ports/Mk/bsd.cmake.mk 1.28 +1 -2 ports/devel/cmake/Makefile 1.21 +3 -3 ports/devel/cmake/distinfo 1.18 +2 -0 ports/devel/cmake/pkg-plist 1.3 +0 -1 ports/x11/qimageblitz/Makefile _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: patched->closed Committed. Thanks!