From dbb33e7dcc514b19bf91518f47fa46a47cd484a3 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Thu, 23 Jan 2020 16:39:01 -0800 Subject: Don't error out if `git describe` fails (#2618) This can occurs in a shallow clone for example that doesn't have any version tags in its history. This is happening on travis CI which is causing the builds to fail since travis uses `--depth=50` when it clones. Fixes #2617 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cb771e257..4efd24c85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git) GIT_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) if(${GIT_VERSION_RESULT}) - message(FATAL_ERROR "Error running git describe to determine version") + message(WARNING "Error running git describe to determine version") else() set(CMAKE_PROJECT_VERSION "${CMAKE_PROJECT_VERSION} (${GIT_VERSION})") endif() -- cgit v1.2.3