Opened 15 years ago
Closed 15 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 )
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 15 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 15 years ago by
comment:3 Changed 15 years ago by
Milestone: | yat 0.x+ → yat 0.5 |
---|---|
Owner: | changed from Jari Häkkinen to Peter |
Status: | new → assigned |
comment:4 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
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.
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.