cmake: fix out-of-git-tree build

Change-Id: Ib94637ec09799c23f3179599b54a2be6e2768425
Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
Damjan Marion
2019-01-28 17:55:59 +01:00
committed by Marco Varlese
parent 7da100bd04
commit 6077c97a60
2 changed files with 2 additions and 11 deletions

View File

@ -109,16 +109,6 @@ foreach(DIR ${SUBDIRS})
add_subdirectory(${DIR})
endforeach()
##############################################################################
# packaging
##############################################################################
include(cmake/pack.cmake)
add_vpp_packaging(
NAME "vpp"
VENDOR "fd.io"
DESCRIPTION "Vector Packet Processor"
)
##############################################################################
# detect if we are inside git repo and add configure dependency
##############################################################################
@ -127,6 +117,7 @@ execute_process(
COMMAND git rev-parse --show-toplevel
OUTPUT_VARIABLE VPP_GIT_TOPLEVEL_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
if (VPP_GIT_TOPLEVEL_DIR)

View File

@ -22,7 +22,7 @@ cat > ${1} << __EOF__
#define VPP_BUILD_DATE "$(date)"
#define VPP_BUILD_USER "$(whoami)"
#define VPP_BUILD_HOST "$(hostname)"
#define VPP_BUILD_TOPDIR "$(git rev-parse --show-toplevel)"
#define VPP_BUILD_TOPDIR "$(git rev-parse --show-toplevel 2> /dev/null)"
#define VPP_BUILD_VER "$(scripts/version)"
#endif
__EOF__