Opened 3 years ago

Last modified 22 months ago

#62642 new defect

cmake 1.1 portgroup sets -DDEBUG for the +debug variant — at Initial Version

Reported by: szhorvat (Szabolcs Horvát) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: portgroup Cc: RJVB (René Bertin)
Port:

Description

The cmake 1.1 portgroup automatically creates the +debug variant, and will use the compiler option -DDEBUG. As far as I can tell, this is a completely arbitrary choice. Unlike NDEBUG, DEBUG is not a standard macro name, and should not be used for all ports.

In fact, this breaks the +debug variant of the igraph port. This was completely unexpected to the igraph project: we simply did not anticipate that anyone would try to compile the library with -DDEBUG. There is some borrowed code within igraph which had some broken printfs fenced by #ifdef DEBUGs, which caused the failure. I will fix this within igraph, but regardless of that, MacPorts's behaviour seems unjustified here.

I suggest simply not using -DDEBUG by default. If a port needs it for its debug mode, it should include it explicitly, not the reverse (i.e. having to remove it explicitly).

This behaviour was originally added here: https://github.com/macports/macports-ports/commit/e8f9c3dbe31f1b604b076a8753b3ea26d265e276

Change History (0)

Note: See TracTickets for help on using tickets.