build: set BUILD_TESTING=OFF when not git checkout
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
b3952d74a8
commit
3eea90afb6
|
@ -83,6 +83,11 @@ include(Options)
|
||||||
include(Toolchain)
|
include(Toolchain)
|
||||||
include(Dependencies)
|
include(Dependencies)
|
||||||
|
|
||||||
|
# Disable tests when not in a git checkout.
|
||||||
|
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||||
|
set(BUILD_TESTING OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Configure gtest
|
# Configure gtest
|
||||||
if(BUILD_TESTING)
|
if(BUILD_TESTING)
|
||||||
FetchContent_Declare(googletest
|
FetchContent_Declare(googletest
|
||||||
|
|
Loading…
Reference in New Issue