Permalink
Browse files

Allow super-projects to disable firebreath-specific git operations.

Git submodule commands must be run from the toplevel of the working tree,
so this is necessary when firebreath is embedded in a git super-project
requiring the firebreath-provided boost submodule.
  • Loading branch information...
Nicolas Tisserand
Nicolas Tisserand committed Nov 21, 2012
1 parent 54653d8 commit e2ef708da17b15be23434333fff78c9a6150ef70
Showing with 7 additions and 1 deletion.
  1. +6 −0 CMakeLists.txt
  2. +1 −1 cmake/common.cmake
View
@@ -18,6 +18,12 @@ set (CMAKE_BACKWARDS_COMPATIBILITY 2.6)
Project (FireBreath)
+# Allow super-projects to disable firebreath-specific git operations.
+if(NOT FIREBREATH_AUTO_GIT)
+ set(FIREBREATH_AUTO_GIT ON)
+endif()
+option(FIREBREATH_AUTO_GIT "Enable automatic git operations." ${FIREBREATH_AUTO_GIT})
+
# First, find FB_ROOT
get_filename_component(FB_ROOT ${CMAKE_CURRENT_LIST_FILE} PATH CACHE)
View
@@ -218,7 +218,7 @@ function (fb_check_boost)
find_program(GIT git
PATHS
)
- if (EXISTS ${FB_ROOT_DIR}/.git AND NOT ${GIT} MATCHES "GIT-NOTFOUND")
+ if (FIREBREATH_AUTO_GIT AND EXISTS ${FB_ROOT_DIR}/.git AND NOT ${GIT} MATCHES "GIT-NOTFOUND")
message("Using git")
if (${GIT} MATCHES "GIT-NOTFOUND")
message(FATAL_ERROR "Can't find git in the path. Please run 'git submodule update --init --recursive' to get firebreath-boost.")

0 comments on commit e2ef708

Please sign in to comment.