From dd214f13cd8c89e926cf054fd84ae27382dd8d24 Mon Sep 17 00:00:00 2001 From: w-klijn <w.f.a.klijn@gmail.com> Date: Wed, 3 May 2017 16:55:56 +0200 Subject: [PATCH] Use cmake source directory instead of current source dir as working dir. (#250) Fixes #249. * Use CMake source directory instead of current source directory as the working directory in git submodule update for `google-benchmark`, in order to support git versions prior to 1.8.4. --- tests/ubench/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ubench/CMakeLists.txt b/tests/ubench/CMakeLists.txt index 27e92ffb..fca1b389 100644 --- a/tests/ubench/CMakeLists.txt +++ b/tests/ubench/CMakeLists.txt @@ -25,7 +25,7 @@ if(NOT EXISTS "${gbench_src_dir}/.git") message(STATUS "Updating the google-benchmark submodule ${gbench_src_dir}") execute_process( COMMAND "${GIT_EXECUTABLE}" submodule update --init "${gbench_src_dir}" - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" ERROR_VARIABLE git_error RESULT_VARIABLE git_result) if(NOT git_result EQUAL 0) -- GitLab