From 94b8dbda33b43ec3d467e3524515bc5f0d477102 Mon Sep 17 00:00:00 2001
From: kongr45gpen <electrovesta@gmail.com>
Date: Sun, 18 Nov 2018 13:34:47 +0200
Subject: [PATCH] Only try to compile catch2 if it has been cloned

---
 CMakeLists.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d0635638..b22d21b0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,6 +16,8 @@ add_custom_target(check
 # Specify the .cpp files for the executables
 add_executable(ecss_services src/main.cpp src/Message.cpp src/Service.cpp src/Services/TestService.cpp)
 
+IF(EXISTS lib/Catch2)
 add_subdirectory(lib/Catch2)
 add_executable(tests src/Message.cpp src/Service.cpp src/Services/TestService.cpp tests/tests.cpp tests/Message.cpp)
 target_link_libraries(tests Catch2::Catch2)
+ENDIF()
-- 
GitLab