summarylogtreecommitdiffstats
path: root/cmake.patch
blob: 3463805245858c95cd5b60eceb54a83fdccc40f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
--- CMakeLists.txt.old	2024-07-29 17:25:19.248487500 +0300
+++ CMakeLists.txt	2024-11-07 15:49:52.057201516 +0200
@@ -17,46 +17,6 @@
 
 # =================================================================================================
 # PROJECT AND VERSION
-include(GetGitRevisionDescription)
-
-git_describe(GIT_DESC)
-
-if (GIT_DESC)
-  string(REGEX REPLACE "^v([0-9]+)\\..*" "\\1" VERSION_MAJOR "${GIT_DESC}")
-  string(REGEX REPLACE "^v[0-9]+\\.([0-9]+).*" "\\1" VERSION_MINOR
-                       "${GIT_DESC}")
-  string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" VERSION_PATCH
-                       "${GIT_DESC}")
-  string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.[0-9]+(.*)" "\\1" VERSION_GIT
-                       "${GIT_DESC}")
-
-  git_local_changes(GIT_STATE)
-  if ("${GIT_STATE}" STREQUAL "DIRTY")
-    set(VERSION_GIT "${VERSION_GIT}-dirty")
-  endif ()
-
-  execute_process(
-    COMMAND git log -1 --format=%ai
-    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
-    OUTPUT_VARIABLE GIT_COMMIT_DATE
-    OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-  # take only the date from the git timestamp:
-  string(REGEX REPLACE "^([0-9\\-]+) .*" "\\1" VERSION_DATE
-                       "${GIT_COMMIT_DATE}")
-else ()
-  file(STRINGS VERSION VERSION_INFO)
-  foreach (line ${VERSION_INFO})
-    if (${line} MATCHES "^([^#].*)=[ \t]*(.*)$")
-      set(key ${CMAKE_MATCH_1})
-      set(value ${CMAKE_MATCH_2})
-      string(REGEX REPLACE "[ \t\n]+$" "" key "${key}")
-      string(REGEX REPLACE "[ \t\n]+$" "" value "${value}")
-      set(VERSION_${key} "${value}")
-      continue()
-    endif ()
-  endforeach ()
-endif ()
 
 project(
   dbcsr