Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LAM Actuator 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
Laser-based Synchronisation
Laser Pulse Arrival Time Monitor
LAM Actuator Server Config
Commits
e906920d
Unverified
Commit
e906920d
authored
1 year ago
by
Christian Willner
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
feat(project-template): add VersionInfo.h generation (#40)
parent
1dcc99e7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
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 @
e906920d
...
...
@@ -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 @
e906920d
#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