aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAttila M. Szilagyi <gougolith@gmail.com>2019-09-15 10:25:32 -0700
committerRoman Lebedev <lebedev.ri@gmail.com>2019-09-15 20:25:32 +0300
commitef7d51c8ebf6fdc10687b4e9eaa48c72461e771d (patch)
tree24ab2646807be9a7e1ae7c5a85bce55b48b8a78f /cmake
parent7ee72863fdb1ccb2af5a011250b56af3f49b7511 (diff)
downloadgoogle-benchmark-ef7d51c8ebf6fdc10687b4e9eaa48c72461e771d.tar.gz
Allow setting GOOGLETEST_PATH cmake argument. Fixes #867 (#868)
In `cmake/GoogleTest.cmake`, GOOGLETEST_PATH is default-initialized, but that init forgot to account for the fact that the patch is explicitly supposed to be user-configurable. By passing `CACHE` to `set()` we avoid that error.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/GoogleTest.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/GoogleTest.cmake b/cmake/GoogleTest.cmake
index fb7c6be..dd611fc 100644
--- a/cmake/GoogleTest.cmake
+++ b/cmake/GoogleTest.cmake
@@ -2,7 +2,7 @@
set(GOOGLETEST_PREFIX "${benchmark_BINARY_DIR}/third_party/googletest")
configure_file(${benchmark_SOURCE_DIR}/cmake/GoogleTest.cmake.in ${GOOGLETEST_PREFIX}/CMakeLists.txt @ONLY)
-set(GOOGLETEST_PATH "${CMAKE_CURRENT_SOURCE_DIR}/googletest") # Mind the quotes
+set(GOOGLETEST_PATH "${CMAKE_CURRENT_SOURCE_DIR}/googletest" CACHE PATH "") # Mind the quotes
execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
-DALLOW_DOWNLOADING_GOOGLETEST=${BENCHMARK_DOWNLOAD_DEPENDENCIES} -DGOOGLETEST_PATH:PATH=${GOOGLETEST_PATH} .
RESULT_VARIABLE result