Add macro to set project version at TDE-wide scope. #84
Merged
MicheleC
merged 1 commits from feat/tde-version
into master
2 years ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'feat/tde-version'
Deleting a branch is permanent. It CANNOT be undone. Continue?
This macro simplifies setting the project version of the modules and updating it when a new TDE version is available.
The macro can be used in two modes:
tde_set_project_version( )
tde_set_project_version( VERSION "your version number" )
Mode 1. will default to the version number DEFAULT_VERSION set in TDEVersion.cmake in the common cmake module. This is the expected usage mode and will make updating all cmake project versions as simple as a single commit in cmake where the DEFAULT_VERSION number is edited.
Mode 2. can be used to specify a specific version number if necessary in case of special testing purposes.
EDIT: no longer provided
I have prepared the required changes to the module CMakeLists.txt repos and tested a few. I will push them after this PR has been accepted.
For R14.0.x the commit needs some editing during cherry picking.
Note: the macro could have been added to TDEMacros.cmake, but I have chosen a standalone file to simplify finding the place where to update the default version when needed.
I still think about how to use another source to identify the version number so that it is not hardcoded outside the source tree of a particular package.
For the time being, I have three options, but all have their disadvantages:
Search the version in
kdemacros.h
. The disadvantage is thatkdemacros.h
is part of tdelibs, so is not available during build ofdependencies
.Use the version from
${CMAKE_SOURCE_DIR}/.tdepkginfo
, in similar way as macrotde_read_src_metadata
. The disadvantage is that this file is generated in deb packaging, but may be missing in other buildings.I think of adjusting the script
create_tarball
to add the version number to${CMAKE_SOURCE_DIR}/.tdescminfo
during creating a source tarball. The disadvantage is that it does not solve the version number for distributions, which builds directly on the git clone of the source code.For now, I have no more ideas.
Hi @SlavekB, thanks for the feedback.
Indeed, all the other three suggested options have downsides which are significant and make those options not practical IMO.
Script
create_tarball
has been updated, so next to the hard-coded version we can add the way of detecting the version number from${CMAKE_SOURCE_DIR}/.tdescminfo
as designed in point 3) above.83045ce30b
to21e0fc60aa
2 years agoUpdated as discussed. The option for custom version is no longer available.
21e0fc60aa
tod1cf3205e5
2 years agod1cf3205e5
to20f556c718
2 years ago20f556c718
to4b9ade570d
2 years ago4b9ade570d
to11a6934bbb
2 years agoGreat, the result looks good.
11a6934bbb
into master 2 years agoReviewers
11a6934bbb
.