aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorxiphon <xiphon@protonmail.com>2018-10-30 05:04:57 +0000
committerxiphon <xiphon@protonmail.com>2018-10-30 05:25:58 +0000
commit8a7e20f8a5b7984355a169fdbc885500f87a0783 (patch)
treefe557bf4d69e359b1cb2f6cbe7cb54cc11bbf511 /CMakeLists.txt
parentMerge pull request #4721 (diff)
downloadmonero-8a7e20f8a5b7984355a169fdbc885500f87a0783.tar.xz
build: older git versions don't have '-C' flag
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3a685ee8e..dd5561f60 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -176,8 +176,8 @@ if(NOT MANUAL_SUBMODULES)
find_package(Git)
if(GIT_FOUND)
function (check_submodule relative_path)
- execute_process(COMMAND git -C ${relative_path} rev-parse "HEAD" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE localHead)
- execute_process(COMMAND git rev-parse "HEAD:${relative_path}" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE checkedHead)
+ execute_process(COMMAND git rev-parse "HEAD" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${relative_path} OUTPUT_VARIABLE localHead)
+ execute_process(COMMAND git rev-parse "HEAD:${relative_path}" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE checkedHead)
string(COMPARE EQUAL "${localHead}" "${checkedHead}" upToDate)
if (upToDate)
message(STATUS "Submodule '${relative_path}' is up-to-date")