regex: disambiguate builtin vs system pcre
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
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"