Skip to content

Commit

Permalink
Fixing git checkout for good this time
Browse files Browse the repository at this point in the history
  • Loading branch information
khuck committed Mar 9, 2020
1 parent 622468b commit f6f1cf2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ include(GitExternal)
git_external(concurrentqueue
https://github.com/cameron314/concurrentqueue.git
master
VERBOSE)
VERBOSE NO_UPDATE)

find_file(
CONCURRENTQUEUE_HEADER
Expand All @@ -670,19 +670,19 @@ else()
endif()

### Set up perfstubs stuff
git_external(perfstubs.git
git_external(perfstubs
https://github.com/khuck/perfstubs.git
master
VERBOSE)

find_file(
PERFSTUBS_HEADER
NAMES perfstubs_api/tool.h
PATHS ${PROJECT_SOURCE_DIR}/perfstubs.git)
PATHS ${PROJECT_SOURCE_DIR}/perfstubs)

if(PERFSTUBS_HEADER)
message(INFO " Found perfstubs at ${PROJECT_SOURCE_DIR}/perfstubs.git")
include_directories(${PROJECT_SOURCE_DIR}/perfstubs.git)
message(INFO " Found perfstubs at ${PROJECT_SOURCE_DIR}/perfstubs")
include_directories(${PROJECT_SOURCE_DIR}/perfstubs)
else()
message(FATAL_ERROR " perfstubs not found. This should have been checked out automatically. "
"Try manually check out https://github.com/khuck/perfstubs.git to ${PROJECT_SOURCE_DIR}")
Expand Down
28 changes: 14 additions & 14 deletions cmake/Modules/GitExternal.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
#
# [optional] Flags which control behaviour
# NO_UPDATE
# When set, GitExternal will not change a repo that has already been checked out.
# The purpose of this is to allow one to set a default branch to be checked out,
# but stop GitExternal from changing back to that branch if the user has checked
# When set, GitExternal will not change a repo that has already been checked out.
# The purpose of this is to allow one to set a default branch to be checked out,
# but stop GitExternal from changing back to that branch if the user has checked
# out and is working on another.
# VERBOSE
# When set, displays information about git commands that are executed
# VERBOSE
# When set, displays information about git commands that are executed
#

find_package(Git)
Expand Down Expand Up @@ -101,15 +101,15 @@ function(GIT_EXTERNAL DIR REPO TAG)
endif()

# update tag
# GIT_EXTERNAL_MESSAGE("git rebase FETCH_HEAD")
# execute_process(COMMAND ${GIT_EXECUTABLE} rebase FETCH_HEAD
# RESULT_VARIABLE RESULT OUTPUT_VARIABLE OUTPUT ERROR_VARIABLE OUTPUT
# WORKING_DIRECTORY "${DIR}")
# if(RESULT)
# message(STATUS "git rebase failed, aborting ${DIR} merge")
# execute_process(COMMAND ${GIT_EXECUTABLE} rebase --abort
# WORKING_DIRECTORY "${DIR}")
# endif()
GIT_EXTERNAL_MESSAGE("git rebase FETCH_HEAD")
execute_process(COMMAND ${GIT_EXECUTABLE} rebase FETCH_HEAD
RESULT_VARIABLE RESULT OUTPUT_VARIABLE OUTPUT ERROR_VARIABLE OUTPUT
WORKING_DIRECTORY "${DIR}")
if(RESULT)
message(STATUS "git rebase failed, aborting ${DIR} merge")
execute_process(COMMAND ${GIT_EXECUTABLE} rebase --abort
WORKING_DIRECTORY "${DIR}")
endif()

endif()
else()
Expand Down

0 comments on commit f6f1cf2

Please sign in to comment.