Commit 622166c446f25db02b31ce6059fae96cf0b6eeb2

Edward Thomson 2019-05-18T19:37:59

regex: disambiguate builtin vs system pcre

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6379495..79d7b55 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -314,7 +314,7 @@ ELSEIF(REGEX STREQUAL "regcomp")
 	SET(GIT_REGEX_REGCOMP 1)
 ELSEIF(REGEX STREQUAL "builtin")
 	ADD_FEATURE_INFO(regex ON "using bundled PCRE")
-	SET(GIT_REGEX_PCRE 1)
+	SET(GIT_REGEX_BUILTIN 1)
 
 	ADD_SUBDIRECTORY("${libgit2_SOURCE_DIR}/deps/pcre" "${libgit2_BINARY_DIR}/deps/pcre")
 	LIST(APPEND LIBGIT2_INCLUDES "${libgit2_SOURCE_DIR}/deps/pcre")
diff --git a/src/features.h.in b/src/features.h.in
index fdc7594..5468cee 100644
--- a/src/features.h.in
+++ b/src/features.h.in
@@ -19,6 +19,7 @@
 #cmakedefine GIT_REGEX_REGCOMP_L
 #cmakedefine GIT_REGEX_REGCOMP
 #cmakedefine GIT_REGEX_PCRE
+#cmakedefine GIT_REGEX_BUILTIN 1
 
 #cmakedefine GIT_SSH 1
 #cmakedefine GIT_SSH_MEMORY_CREDENTIALS 1
diff --git a/src/posix_regex.h b/src/posix_regex.h
index 5d0342e..a0482c9 100644
--- a/src/posix_regex.h
+++ b/src/posix_regex.h
@@ -15,7 +15,7 @@
  * compatible implementation.
  */
 
-#ifdef GIT_REGEX_PCRE
+#ifdef GIT_REGEX_BUILTIN
 
 # include "pcreposix.h"