mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-18 14:45:20 +00:00
Update the files which contain no license information with the 'Apache-2.0' SPDX license identifier. Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of Zephyr, which is Apache version 2. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
23 lines
752 B
CMake
23 lines
752 B
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# Use git if it is installed, to set BUILD_VERSION
|
|
|
|
# https://cmake.org/cmake/help/latest/module/FindGit.html
|
|
find_package(Git QUIET)
|
|
if(GIT_FOUND)
|
|
execute_process(
|
|
COMMAND ${GIT_EXECUTABLE} describe --abbrev=12
|
|
WORKING_DIRECTORY ${ZEPHYR_BASE}
|
|
OUTPUT_VARIABLE BUILD_VERSION
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
ERROR_STRIP_TRAILING_WHITESPACE
|
|
ERROR_VARIABLE stderr
|
|
RESULT_VARIABLE return_code
|
|
)
|
|
if(return_code)
|
|
message(STATUS "git describe failed: ${stderr}; ${KERNEL_VERSION_STRING} will be used instead")
|
|
elseif(CMAKE_VERBOSE_MAKEFILE)
|
|
message(STATUS "git describe stderr: ${stderr}")
|
|
endif()
|
|
endif()
|