From a50d69c3b292b10ab284c7bd761a448ccf22fd66 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Wed, 2 Nov 2016 13:05:13 +0100 Subject: [PATCH] Mark gtest variables cached (#3980) * Mark gtest variables cached Set GTEST location variables as CACHE so they can be modified when gtest is in a different location from the cmake call (/usr/src, /usr/include is not writable on OS X) * Uppercase location and write Google Test like Google does --- radio/src/tests/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/radio/src/tests/CMakeLists.txt b/radio/src/tests/CMakeLists.txt index 7b5bf8db2..1f51cfebf 100644 --- a/radio/src/tests/CMakeLists.txt +++ b/radio/src/tests/CMakeLists.txt @@ -1,5 +1,5 @@ -set(GTEST_INCDIR /usr/include/gtest) -set(GTEST_SRCDIR /usr/src/gtest) +set(GTEST_INCDIR /usr/include/gtest CACHE string "Location of Google Test includes") +set(GTEST_SRCDIR /usr/src/gtest CACHE string "Location of Google Test directory") if(EXISTS "${GTEST_SRCDIR}/src/gtest-all.cc") if(Qt5Widgets_FOUND) @@ -35,4 +35,4 @@ if(EXISTS "${GTEST_SRCDIR}/src/gtest-all.cc") endif() else() message("WARNING: can't find gtests source, gtest target will not be available!") -endif() \ No newline at end of file +endif()