Skip to content

Commit

Permalink
Suppress spurious error messages during JVersion.h creation
Browse files Browse the repository at this point in the history
These arise when building from a tarball because the .git directory is not present, as per issue #316.
  • Loading branch information
nathanwbrei committed Jul 16, 2024
1 parent e6d4fcd commit 88e586a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmake/MakeJVersionH.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,29 @@ set_property(
)

execute_process(
COMMAND git log -1 --format=%H
COMMAND git log -1 --format=%H 2>/dev/null
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
RESULT_VARIABLE JVERSION_GIT_RESULT
OUTPUT_VARIABLE JVERSION_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)

execute_process(
COMMAND git log -1 --format=%aD
COMMAND git log -1 --format=%aD 2>/dev/null
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
OUTPUT_VARIABLE JVERSION_COMMIT_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE
)

execute_process(
COMMAND git show-ref -s v${jana2_VERSION_MAJOR}.${jana2_VERSION_MINOR}.${jana2_VERSION_PATCH}
COMMAND git show-ref -s v${jana2_VERSION_MAJOR}.${jana2_VERSION_MINOR}.${jana2_VERSION_PATCH} 2>/dev/null
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
OUTPUT_VARIABLE JVERSION_RELEASE_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)

execute_process(
COMMAND git status --porcelain
COMMAND git status --porcelain 2>/dev/null
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
OUTPUT_VARIABLE JVERSION_MODIFIED_FILES
OUTPUT_STRIP_TRAILING_WHITESPACE
Expand Down

0 comments on commit 88e586a

Please sign in to comment.