@@ -11,10 +11,7 @@ This module should not be used outside YCM.
11
11
12
12
Variables defined by this module::
13
13
14
- YCM_VERSION - Full version, including git commit and dirty state.
15
- YCM_VERSION_MAJOR - YCM major version
16
- YCM_VERSION_MINOR - YCM minor version
17
- YCM_VERSION_PATCH - YCM patch version
14
+ YCM_VERSION_FULL - Full version, including git commit and dirty state.
18
15
YCM_VERSION_REVISION - Number of commits since latest release (git only)
19
16
YCM_VERSION_DATE - Date of the latest commit (git only)
20
17
YCM_VERSION_DATE_REVISION - Number of commits since of beginning of the day
@@ -30,13 +27,8 @@ Variables defined by this module::
30
27
31
28
include (GitInfo)
32
29
33
- set (YCM_VERSION_MAJOR 0)
34
- set (YCM_VERSION_MINOR 16)
35
- set (YCM_VERSION_PATCH 9)
36
-
37
30
set (YCM_VERSION_API "${YCM_VERSION_MAJOR} .${YCM_VERSION_MINOR} " )
38
31
set (YCM_VERSION_SHORT "${YCM_VERSION_MAJOR} .${YCM_VERSION_MINOR} .${YCM_VERSION_PATCH} " )
39
- set (YCM_VERSION "${YCM_VERSION_SHORT} " )
40
32
41
33
unset (YCM_VERSION_SOURCE)
42
34
unset (YCM_VERSION_DIRTY)
@@ -73,22 +65,22 @@ if(DEFINED YCM_GIT_WT_HASH)
73
65
string (APPEND YCM_VERSION_SHORT ".${YCM_VERSION_REVISION} " )
74
66
endif ()
75
67
set (YCM_VERSION_SOURCE "${_date} +git${YCM_GIT_WT_HASH_SHORT} " )
76
- set (YCM_VERSION "${YCM_VERSION_SHORT} -${YCM_VERSION_SOURCE} " )
68
+ set (YCM_VERSION_FULL "${YCM_VERSION_SHORT} -${YCM_VERSION_SOURCE} " )
77
69
elseif (NOT "${YCM_GIT_WT_TAG} " STREQUAL "v${YCM_VERSION_SHORT} " )
78
70
# This is the same commit as the latest tag, but the version different
79
71
# Probably some work in progress...
80
72
# Add some random information.
81
73
string (TIMESTAMP _ts "%Y%m%d" )
82
74
string (APPEND YCM_VERSION_SHORT "~${_ts} " )
83
- set (YCM_VERSION "${YCM_VERSION_SHORT} " )
75
+ set (YCM_VERSION_FULL "${YCM_VERSION_SHORT} " )
84
76
else ()
85
77
# Same commit as latest tag.
86
78
# Nothing to do
87
79
endif ()
88
80
# Include information about the "dirty" status.
89
81
if (YCM_GIT_WT_DIRTY)
90
82
set (YCM_VERSION_DIRTY "dirty" )
91
- set (YCM_VERSION "${YCM_VERSION} +${YCM_VERSION_DIRTY} " )
83
+ set (YCM_VERSION_FULL "${YCM_VERSION} +${YCM_VERSION_DIRTY} " )
92
84
endif ()
93
85
else ()
94
86
# This is not a git repository or git is missing.
97
89
# Add some random information.
98
90
string (TIMESTAMP YCM_VERSION_PATCH "%Y%m%d" )
99
91
set (YCM_VERSION_SHORT "${YCM_VERSION_MAJOR} .${YCM_VERSION_MINOR} .${YCM_VERSION_PATCH} " )
100
- set (YCM_VERSION "${YCM_VERSION_SHORT} ~dev" )
92
+ set (YCM_VERSION_FULL "${YCM_VERSION_SHORT} ~dev" )
101
93
else ()
102
94
# We assume that this is a release, there is not much that we can do if it's
103
95
# not.
@@ -111,6 +103,7 @@ if(YCM_VERSION_DEBUG)
111
103
YCM_VERSION_SHORT
112
104
YCM_VERSION_MAJOR
113
105
YCM_VERSION_MINOR
106
+ YCM_VERSION_FULL
114
107
YCM_VERSION_PATCH
115
108
YCM_VERSION_REVISION
116
109
YCM_VERSION_DATE
@@ -122,4 +115,4 @@ if(YCM_VERSION_DEBUG)
122
115
endforeach ()
123
116
endif ()
124
117
125
- message (STATUS "YCM Version: ${YCM_VERSION } (${YCM_VERSION_SHORT} )" )
118
+ message (STATUS "YCM Version: ${YCM_VERSION_FULL } (${YCM_VERSION_SHORT} )" )
0 commit comments