forked from Archive/PX4-Autopilot
Optionalized build dependency on git
Signed-off-by: Bill Morris <bill@sevendof.com>
This commit is contained in:
parent
794e6ec3a5
commit
b96c62ed8b
|
@ -47,12 +47,14 @@ message(STATUS "build type is ${CMAKE_BUILD_TYPE}")
|
|||
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug;Release;RelWithDebInfo;MinSizeRel;Coverage")
|
||||
|
||||
execute_process(
|
||||
COMMAND git describe --always --tags
|
||||
OUTPUT_VARIABLE git_tag
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
|
||||
execute_process(
|
||||
COMMAND git describe --always --tags
|
||||
OUTPUT_VARIABLE git_tag
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
message(STATUS "PX4 ECL: Very lightweight Estimation & Control Library ${git_tag}")
|
||||
|
||||
|
|
Loading…
Reference in New Issue