Ok, now that most of the big picture things are out of the way with the
cmake config, I'd like to get to cleaning and nit-picking.
Once of those nit-picks is version.h. Currently there's two of them, one in
the main fdmdv2 directory and one in the src subdirectory. This is causing
the version numbers to get out of sync because they're also specified in
the cmake configuration. I could do some regex magic to pull it in from
src/version.h which was my initial plan but the more I think about it. The
more I think we don't need it.
The one in the src subdirectory is the one that get's picked up and looks
like this:
#ifndef FREEDV_VER_DOT_H
#define FREEDV_VER_DOT_H 1
#define FREEDV_VERSION "0.96.3 Beta"
#endif //FREEDV_VER_DOT_H
Now, since these are done as defines, there's no reason we can't manage
this from the main cmake config file, secondly there doesn't appear to be
anywhere in the source that uses FREEDV_VER_DOT_H nor do I know what it's
intended use is.
I propose that both version.h files go away and the versioning be managed
from the cmake configuration:
#
# Setup version.
#
set(FREEDV_VERSION_MAJOR 0)
set(FREEDV_VERSION_MINOR 96)
# Set to value for patch level releases, otherwise leave as FALSE.
set(FREEDV_VERSION_PATCH 3)
set(FREEDV_VERSION "${FREEDV_VERSION_MAJOR}.${FREEDV_VERSION_MINOR}")
if(FREEDV_VERSION_PATCH)
set(FREEDV_VERSION ${FREEDV_VERSION}.${FREEDV_VERSION_PATCH})
endif(FREEDV_VERSION_PATCH)
add_definitions(-DFREEDV_VERSION="${FREEDV_VERSION} Beta")
Notice that I've manually put "Beta" in the definition. I think that's the
simplest approach.
I know not everyone understands cmake but I think this is pretty straight
forward.
Thoughts?
Richard
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Freetel-codec2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freetel-codec2