summaryrefslogtreecommitdiff
blob: fe32b54c6eed74522c5a90b1863cabf8c0aad13b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
https://github.com/xbmc/inputstream.adaptive/pull/637

From 3c321bf5e0882b9592b485a551cfc83647727350 Mon Sep 17 00:00:00 2001
From: Craig Andrews <candrews@integralblue.com>
Date: Fri, 9 Apr 2021 16:25:31 -0400
Subject: [PATCH] Only enable testing if BUILD_TESTING is set

BUILD_TESTING is the convention for enabling test building.

This condition allows building without gtest.
---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2000e27a..42f15563 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -100,7 +100,7 @@ build_addon(inputstream.adaptive ADP DEPLIBS)
 
 include(CPack)
 
-if(NOT CMAKE_CROSSCOMPILING)
+if(NOT CMAKE_CROSSCOMPILING AND BUILD_TESTING)
   list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure")
   enable_testing()
   include(FindGtest)