Skip to content

Commit

Permalink
ci: Remove git revision from Knut version
Browse files Browse the repository at this point in the history
This breaks sccache, as every new commit now had different compiler
arguments!
  • Loading branch information
LeonMatthesKDAB committed Jun 10, 2024
1 parent 4e9680e commit 66c0acc
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,21 @@ endif()
add_definitions(-DKNUT_VERSION="${PROJECT_VERSION}")
set(KNUT_VERSION_STRING "${PROJECT_VERSION}")

if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
find_package(Git)
if(GIT_FOUND)
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_REVISION)
string(REGEX REPLACE "\n" "" GIT_REVISION "${GIT_REVISION}")
message(STATUS "Git revision ${GIT_REVISION} with exe ${GIT_EXECUTABLE}")
set(KNUT_VERSION_STRING
"${KNUT_VERSION_STRING} (revision: ${GIT_REVISION})")
else()
message(STATUS "GIT not found!?")
endif()
endif()
# if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
# find_package(Git)
# if(GIT_FOUND)
# execute_process(
# COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
# WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
# OUTPUT_VARIABLE GIT_REVISION)
# string(REGEX REPLACE "\n" "" GIT_REVISION "${GIT_REVISION}")
# message(STATUS "Git revision ${GIT_REVISION} with exe ${GIT_EXECUTABLE}")
# set(KNUT_VERSION_STRING
# "${KNUT_VERSION_STRING} (revision: ${GIT_REVISION})")
# else()
# message(STATUS "GIT not found!?")
# endif()
# endif()
add_definitions(-DKNUT_VERSION_STRING="${KNUT_VERSION_STRING}")

# Generate build date for the about dialog Note: This is the simplest way to get
Expand Down

0 comments on commit 66c0acc

Please sign in to comment.