Opened 13 years ago

Closed 13 years ago

#405 closed discussion (fixed)

yat-config --cppflags return -DNDEBUG

Reported by: Peter Owned by: Peter
Priority: minor Milestone: yat 0.5
Component: build Version: trunk
Keywords: Cc:

Description (last modified by Peter)

yat-config returns the same options that were used building yat. I think this is odd because some of them should preferbly not propagate to a user build. These options include

-g O3 -DNDEBUG -DYAT_DEBUG -DHAVE_INLINE

DNDEBUG and DHAVE_INLINE could be placed in config.h with the drawback that config.h then must be included in all source files. Otherwice one could use another variable e.g. YAT_DEFAULT_CPPFLAGS that is propagated into makefiles but not to yat-config.

Change History (4)

comment:1 Changed 13 years ago by Peter

Description: modified (diff)

comment:2 Changed 13 years ago by Peter

Letting all src include config.h implies entire yat must be rebuild when config.h is changed. This might be good if the change is because NDEBUG has been defined, but might be less attractive when it is only the version number that has been changed.

comment:3 Changed 13 years ago by Peter

Milestone: yat 0.x+yat 0.5
Owner: changed from Jari Häkkinen to Peter
Status: newassigned

comment:4 Changed 13 years ago by Peter

Resolution: fixed
Status: assignedclosed

(In [1479]) fixes #405

Setting AM_*FLAGS in configure. There are two paths to end up in AM_*FLAGS. 1) you are set through corresponding *FLAGS, then swapped into EXTRA_*FLAGS, and finally concatenated into AM_*FLAGS. These flags are also stored in EXTRA_*FLAGS and are used in yat-config to let the user of yat know which flags are important when using yat. Flags that are not important for using yat, but mostly useful when building yat, are set directly to AM_*FLAGS.

It is, of course, an open question which flags should be propagated to a user, but for now I chose to propagate, on top of those that are essential, gsl flags -DHAVE_INLINE and -DGSL_RANGE_CHECK_OFF.

This probably makes yat.am obsolete, but I keep it for now.

Note: See TracTickets for help on using tickets.