File tree Expand file tree Collapse file tree 4 files changed +7
-21
lines changed
Expand file tree Collapse file tree 4 files changed +7
-21
lines changed Original file line number Diff line number Diff line change 2222
2323 - name : Checkout
2424 uses : actions/checkout@v4
25+ with :
26+ fetch-depth : ' 0'
2527
2628 - name : Install packaged dependencies
2729 run : .github/install_dependencies
Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.1)
22project (RTLSDR-Airband CXX)
33
4- set (RTL_AIRBAND_VERSION_MAJOR 5)
5- set (RTL_AIRBAND_VERSION_MINOR 0)
6- set (RTL_AIRBAND_VERSION_PATCH 0)
7- set (RTL_AIRBAND_VERSION "${RTL_AIRBAND_VERSION_MAJOR} .${RTL_AIRBAND_VERSION_MINOR} .${RTL_AIRBAND_VERSION_PATCH} " )
4+ execute_process (COMMAND git describe --tags --abbrev --dirty --always
5+ OUTPUT_VARIABLE RTL_AIRBAND_VERSION
6+ OUTPUT_STRIP_TRAILING_WHITESPACE)
87
98set (CMAKE_CXX_STANDARD 11)
109set (CXX_STANDARD_REQUIRED ON )
@@ -26,4 +25,3 @@ if(DEBUG_SQUELCH)
2625endif ()
2726
2827add_subdirectory (src)
29-
Original file line number Diff line number Diff line change @@ -248,6 +248,7 @@ else()
248248endif ()
249249
250250message (STATUS "RTLSDR-Airband configuration summary:\n " )
251+ message (STATUS "- Version string:\t\t ${RTL_AIRBAND_VERSION} " )
251252message (STATUS "- Build type:\t\t ${CMAKE_BUILD_TYPE} " )
252253message (STATUS "- Operating system:\t\t ${CMAKE_SYSTEM_NAME} " )
253254message (STATUS "- SDR drivers:" )
Original file line number Diff line number Diff line change 1- set (VERSION "char const *RTL_AIRBAND_VERSION=\" " )
2- execute_process (COMMAND git describe --always --tags --dirty
3- OUTPUT_VARIABLE GIT_VERSION
4- ERROR_QUIET
5- OUTPUT_STRIP_TRAILING_WHITESPACE)
6-
7- if ("${GIT_VERSION} " STREQUAL "" )
8- string (APPEND VERSION "${RTL_AIRBAND_VERSION} " )
9- elseif ("${GIT_VERSION} " MATCHES ".+-g(.+)" )
10- string (APPEND VERSION "${RTL_AIRBAND_VERSION} -${CMAKE_MATCH_1} " )
11- elseif ("${GIT_VERSION} " MATCHES "v(.+)" )
12- string (APPEND VERSION "${CMAKE_MATCH_1} " )
13- else ()
14- string (APPEND VERSION "${RTL_AIRBAND_VERSION} -${GIT_VERSION} " )
15- endif ()
16- string (APPEND VERSION "\" ;\n " )
1+ set (VERSION "char const *RTL_AIRBAND_VERSION=\" ${RTL_AIRBAND_VERSION} \" ;\n " )
172
183if (EXISTS ${CMAKE_CURRENT_BINARY_DIR} /version .cpp)
194 file (READ ${CMAKE_CURRENT_BINARY_DIR} /version .cpp VERSION_)
You can’t perform that action at this time.
0 commit comments