Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TEC Server Config
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MSK-SW
Infrastructure and Support
TEC
TEC Server Config
Commits
951310a4
Commit
951310a4
authored
1 year ago
by
Martin Christoph Hierholzer
Browse files
Options
Downloads
Plain Diff
Merge project-template (automated)
parents
9b69d6fa
e906920d
No related branches found
Branches containing commit
Tags
08.00.01
Tags containing commit
1 merge request
!6
feat(project-template): add VersionInfo.h generation (#40)
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmake/set_version_numbers.cmake
+9
-0
9 additions, 0 deletions
cmake/set_version_numbers.cmake
cmake/version_info_template.h.in
+9
-0
9 additions, 0 deletions
cmake/version_info_template.h.in
with
18 additions
and
0 deletions
cmake/set_version_numbers.cmake
+
9
−
0
View file @
951310a4
...
...
@@ -35,3 +35,12 @@ endif( ${PROJECT_NAME}_BUILDVERSION )
set
(
${
PROJECT_NAME
}
_FULL_LIBRARY_VERSION
${${
PROJECT_NAME
}
_SOVERSION
}
.
${${
PROJECT_NAME
}
_PATCH_VERSION
}
)
# The following generates a cpp header file that can be used to access the CMAKE version info.
# The "VersionInfo.h" is available in the project's build directory and included in the build.
string
(
REGEX REPLACE
"^0"
""
${
PROJECT_NAME
}
_MAJOR_VERSION_INT
${${
PROJECT_NAME
}
_MAJOR_VERSION
}
)
string
(
REGEX REPLACE
"^0"
""
${
PROJECT_NAME
}
_MINOR_VERSION_INT
${${
PROJECT_NAME
}
_MINOR_VERSION
}
)
string
(
REGEX REPLACE
"^0"
""
${
PROJECT_NAME
}
_PATCH_VERSION_INT
${${
PROJECT_NAME
}
_PATCH_VERSION
}
)
configure_file
(
cmake/version_info_template.h.in
"
${
PROJECT_BINARY_DIR
}
/generated/VersionInfo.h"
)
include_directories
(
${
PROJECT_BINARY_DIR
}
/generated
)
This diff is collapsed.
Click to expand it.
cmake/version_info_template.h.in
0 → 100644
+
9
−
0
View file @
951310a4
#pragma once
namespace ChimeraTK::VersionInfo {
const int major{${${PROJECT_NAME}_MAJOR_VERSION_INT}};
const int minor{${${PROJECT_NAME}_MINOR_VERSION_INT}};
const int applicationPatch{${${PROJECT_NAME}_PATCH_VERSION_INT}};
} // namespace ChimeraTK::VersionInfo
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment