summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGianfranco Costamagna <costamagnagianfranco@yahoo.it>2021-05-17 02:53:40 +0200
committerGitHub <noreply@github.com>2021-05-17 09:53:40 +0900
commitd40ecef57050a48ca2abf9c307793d183972658e (patch)
treecc99dc7329e44cc1f3e73e0f8df972db5ff6a85e /CMakeLists.txt
parent49ef927f7d3e6c9be4e6a0b81ee3bea28960db11 (diff)
downloadDLT-daemon-d40ecef57050a48ca2abf9c307793d183972658e.tar.gz
gtest: Find system-provided external gtest (#301)
Find system-provided external gtest in case a system version is available, without need to recompile the bundled version everytime
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 08900a9..9bc416a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -240,7 +240,11 @@ add_subdirectory(src)
add_subdirectory(include/dlt)
add_subdirectory(testscripts)
if (WITH_DLT_UNIT_TESTS)
- add_subdirectory( gtest-1.7.0 )
+ find_package(GTest)
+
+ if (NOT GTEST_FOUND)
+ add_subdirectory( gtest-1.7.0 )
+ endif()
enable_testing()
add_subdirectory(tests)
endif()