From 027fcaa5ccd625c8cc5a2472d856973e4173acdb Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 28 May 2014 22:12:29 +0200 Subject: [PATCH] Do not force cache of GTEST_DIR_LOCAL so the user can chose either define it or not from cmake commandline --- src/tests/CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 58f730476..568ee181e 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -20,14 +20,13 @@ if(EXISTS $ENV{GTEST_DIR}) set(GTEST_DIR_LOCAL $ENV{GTEST_DIR}) endif(EXISTS $ENV{GTEST_DIR}) -set(GTEST_DIR_LOCAL "$ENV{GTEST_DIR}") if(GTEST_DIR) set(GTEST_DIR_LOCAL ${GTEST_DIR}) endif(GTEST_DIR) if(NOT GTEST_DIR_LOCAL) - set(GTEST_DIR_LOCAL false CACHE STRING "Gtest downloaded and built automatically" FORCE) + set(GTEST_DIR_LOCAL false CACHE STRING "Gtest downloaded and built automatically") else() - set(GTEST_DIR_LOCAL true CACHE STRING "Gtest already downloaded" FORCE) + set(GTEST_DIR_LOCAL true CACHE STRING "Gtest already downloaded") endif(NOT GTEST_DIR_LOCAL)