Skip to content

Commit

Permalink
BUG: Do not use git call-outs to obtain Nifti version
Browse files Browse the repository at this point in the history
The command adds overhead and it is not the right repository when
bundled. Also, in distribution outside Git, there is no repository.
  • Loading branch information
thewtex committed Jan 19, 2022
1 parent bf4e88d commit cfb3f28
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Modules/ThirdParty/NIFTI/src/nifti/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ else()
endif()
cmake_policy(VERSION ${NIFTI_CMAKE_POLICY_VERSION})

if(0) # ITK -- start: do not use Git to get the version
set(NIFTI_HOMEPAGE_URL "https://nifti-imaging.github.io")
execute_process(COMMAND git "describe" "--tags"
OUTPUT_VARIABLE GIT_REPO_VERSION_UNCLEANED
Expand All @@ -27,6 +28,9 @@ if( NOT GIT_REPO_VERSION )
# to set the repo string for non-git repos.
set(GIT_REPO_VERSION "0.0.0.0") #Manually set the version string for testing purposes
endif()
else() # ITK
set(GIT_REPO_VERSION "0.0.0.0")
endif() # ITK -- end: do not use Git to get the version
project(NIFTI
VERSION ${GIT_REPO_VERSION}
DESCRIPTION "Niftilib is a set of i/o libraries for reading and writing files in the nifti-1 data format. nifti-1 is a binary file format for storing medical image data, e.g. magnetic resonance image (MRI) and functional MRI (fMRI) brain images."
Expand Down

0 comments on commit cfb3f28

Please sign in to comment.