summaryrefslogtreecommitdiffstats
path: root/cmake/FindGit.cmake
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cmake/FindGit.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/cmake/FindGit.cmake b/cmake/FindGit.cmake
new file mode 100644
index 00000000..8178b614
--- /dev/null
+++ b/cmake/FindGit.cmake
@@ -0,0 +1,13 @@
+if(GIT_EXECUTABLE)
+ set(GIT_FOUND TRUE)
+ return()
+endif()
+if(DEFINED GIT_EXECUTABLE)
+ set(GIT_FOUND FALSE)
+ return()
+endif()
+
+set(orig_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
+unset(CMAKE_MODULE_PATH)
+include(FindGit)
+set(CMAKE_MODULE_PATH ${orig_CMAKE_MODULE_PATH})