Bug 159276 - devel/cmake: Debug builds do not work as expected
Summary: devel/cmake: Debug builds do not work as expected
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-28 23:10 UTC by Mark Kane
Modified: 2011-09-11 03:18 UTC (History)
0 users

See Also:


Attachments
patch.bsd.cmake.mk.txt (695 bytes, text/plain)
2011-08-28 07:06 UTC, 2igosha
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Kane 2011-07-28 23:10:08 UTC
Applications that use cmake and the debug build type (CMAKE_BUILD_TYPE=DEBUG) are not built properly when using cmake outside of the ports system. This appears to be due to the following patch:

http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/cmake/files/patch-Modules_Compiler_GNU.cmake?rev=1.1

With this patch, "-g" is not added to the debug build as is normally expected. Setting CFLAGS/CXXFLAGS manually in the environment does seem to work as the commit message suggests, however this is not required when using the upstream version of cmake and can cause confusion when the predefined debug build type does not work as expected.

Thanks in advance.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-07-28 23:10:17 UTC
Responsible Changed
From-To: freebsd-ports-bugs->kde

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 2igosha 2011-08-28 07:06:30 UTC
I suggest removing
ports/devel/cmake/files/patch-Modules_Compiler_GNU.cmake and patching
ports/Mk/bsd.cmake.mk instead.
This will solve the issue and keep correct C(XX)FLAGS for ports for both
Debug and Release configurations.
Comment 3 Alberto Villa freebsd_committer freebsd_triage 2011-08-30 00:17:26 UTC
max, what do you think of the proposed patch? i'm going to test it on 
area51

can you remember what exactly made us commit the current patch?
-- 
Alberto Villa, FreeBSD committer <avilla@FreeBSD.org>
http://people.FreeBSD.org/~avilla

Chess tonight.
Comment 4 Alberto Villa freebsd_committer freebsd_triage 2011-08-30 00:17:55 UTC
State Changed
From-To: open->analyzed

Currently under investigation/testing.
Comment 5 Alberto Villa freebsd_committer freebsd_triage 2011-08-30 09:05:22 UTC
State Changed
From-To: analyzed->patched

Committed to area51. The patch seems to work fine, there is no reference 
to -O3 (default release flags) in test buidls. We'll consider committing 
it to ports after extensive testing.
Comment 6 Max Brazhnikov freebsd_committer freebsd_triage 2011-09-06 18:37:42 UTC
On Tue, 30 Aug 2011 01:17:26 +0200, Alberto Villa wrote:
> max, what do you think of the proposed patch? i'm going to test it on
> area51

If it works, i.e. cmake does respect system CFLAGS, then I'm fine with it.

> can you remember what exactly made us commit the current patch?

Apparently something didn't satisfy us that time.

Max
Comment 7 dfilter service freebsd_committer freebsd_triage 2011-09-11 03:04:22 UTC
rakuco      2011-09-11 02:04:09 UTC

  FreeBSD ports repository

  Modified files:
    Mk                   bsd.cmake.mk 
    devel/cmake          Makefile 
  Removed files:
    devel/cmake/files    patch-Modules_Compiler_GNU.cmake 
  Log:
  - Remove the patch that was clearing default build flags for build
    profiles, so that CMake can be used outside of ports.
  - Bump CMake PORTREVISION.
  - Pass default build flags (at least I hope) via bsd.cmake.mk.
  
  PR:             159276
  Submitted by:   Igor Soumenkov <2igosha@gmail.com>
  Approved by:    avilla (mentor)
  
  Revision  Changes    Path
  1.10      +5 -1      ports/Mk/bsd.cmake.mk
  1.48      +1 -1      ports/devel/cmake/Makefile
  1.2       +0 -14     ports/devel/cmake/files/patch-Modules_Compiler_GNU.cmake (dead)
_______________________________________________
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"
Comment 8 Alberto Villa freebsd_committer freebsd_triage 2011-09-11 03:18:02 UTC
State Changed
From-To: patched->closed

Committed, with minor changes. Thanks!