Skip to content

Commit

Permalink
Change CMake commands to lower case for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
aprokop committed Oct 16, 2021
1 parent 4b4b7d1 commit 19459dc
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions cmake/SetupVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@
# is called by through a target created by add_custom_target so that it is
# always considered to be out-of-date.

SET(ARBORX_GIT_COMMIT_HASH "No hash available")
set(ARBORX_GIT_COMMIT_HASH "No hash available")

IF(EXISTS ${SOURCE_DIR}/.git)
FIND_PACKAGE(Git QUIET)
IF(GIT_FOUND)
EXECUTE_PROCESS(
if(EXISTS ${SOURCE_DIR}/.git)
find_package(Git QUIET)
if(GIT_FOUND)
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --verify --short HEAD
OUTPUT_VARIABLE ARBORX_GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
EXECUTE_PROCESS(
execute_process(
COMMAND ${GIT_EXECUTABLE} status --porcelain -uno
OUTPUT_VARIABLE ARBORX_GIT_WORKTREE_STATUS)
IF(ARBORX_GIT_WORKTREE_STATUS)
SET(ARBORX_GIT_COMMIT_HASH "${ARBORX_GIT_COMMIT_HASH}-dirty")
ENDIF()
ENDIF()
ENDIF()
MESSAGE(STATUS "ArborX hash = '${ARBORX_GIT_COMMIT_HASH}'")
if(ARBORX_GIT_WORKTREE_STATUS)
set(ARBORX_GIT_COMMIT_HASH "${ARBORX_GIT_COMMIT_HASH}-dirty")
endif()
endif()
endif()
message(STATUS "ArborX hash = '${ARBORX_GIT_COMMIT_HASH}'")

configure_file(${SOURCE_DIR}/src/ArborX_Version.hpp.in
${BINARY_DIR}/include/ArborX_Version.hpp)

0 comments on commit 19459dc

Please sign in to comment.