We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4602393 + e53df30 commit 2ff0188Copy full SHA for 2ff0188
CMakeLists.txt
@@ -10,7 +10,13 @@ endif()
10
#=====================
11
project(multitail LANGUAGES C)
12
# set VERSION using version file
13
-file (STRINGS "version" VERSION)
+file (STRINGS "version" VERSION_CONTENT)
14
+if(VERSION_CONTENT MATCHES "VERSION=([0-9]+\\.[0-9]+\\.[0-9]+)")
15
+ set(VERSION "${CMAKE_MATCH_1}")
16
+ message(STATUS "Project version: ${VERSION}")
17
+else()
18
+ message(FATAL_ERROR "Unable to extract version from ./version")
19
+endif()
20
21
22
# usage:
0 commit comments