Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
csg-eb
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
exa
csg-eb
Merge requests
!125
add git hash as a property
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
add git hash as a property
rangarad/csg-eb:add_git_hash
into
main
Overview
0
Commits
1
Pipelines
1
Changes
2
Merged
Deepak Rangarajan
requested to merge
rangarad/csg-eb:add_git_hash
into
main
1 year ago
Overview
0
Commits
1
Pipelines
1
Changes
2
Expand
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
52f2779a
1 commit,
1 year ago
2 files
+
27
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
CMakeLists.txt
+
21
−
0
Options
@@ -60,3 +60,24 @@ install(EXPORT CsgEbConfig
if
(
CSG_CGAL_ENABLED
)
target_compile_definitions
(
csg-eb PUBLIC USE_CGAL
)
endif
()
set
(
CSGEB_GIT_HASH
""
)
execute_process
(
COMMAND git describe --abbrev=12 --dirty --always --tags
WORKING_DIRECTORY
${
PROJECT_SOURCE_DIR
}
OUTPUT_VARIABLE CSGEB_GIT_HASH
ERROR_VARIABLE _tmperr
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if
(
_tmperr
)
message
(
WARNING
"Failing to retrieve Git commit from repo:
${
PROJECT_SOURCE_DIR
}
"
)
endif
()
set_target_properties
(
csg-eb PROPERTIES CSGEB_GIT_HASH
${
CSGEB_GIT_HASH
}
EXPORT_PROPERTIES CSGEB_GIT_HASH
)
# to be used by gnumake
file
(
WRITE
${
CMAKE_CURRENT_BINARY_DIR
}
/CsgEbConfig.mk
"CSGEB_GIT_HASH :=
${
CSGEB_GIT_HASH
}
"
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/CsgEbConfig.mk
DESTINATION
"
${
CMAKE_INSTALL_PREFIX
}
"
)
Loading