You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
srsRAN_4G/cmake/modules/SRSRANbuildinfo.cmake.in

21 lines
490 B
CMake

execute_process(
COMMAND git rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY "@PROJECT_SOURCE_DIR@"
OUTPUT_VARIABLE GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(
COMMAND git log -1 --format=%h
WORKING_DIRECTORY "@PROJECT_SOURCE_DIR@"
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message(STATUS "Generating build_info.h")
configure_file(
@PROJECT_SOURCE_DIR@/lib/include/srsran/build_info.h.in
@CMAKE_BINARY_DIR@/lib/include/srsran/build_info.h
)