Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
ac2b235e
Commit
ac2b235e
authored
5 years ago
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regex: use REGEX_BACKEND as the cmake option name
This avoids any misunderstanding with the REGEX keyword in cmake.
parent
ce6d624a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
CMakeLists.txt
+1
-1
src/CMakeLists.txt
+10
-10
No files found.
CMakeLists.txt
View file @
ac2b235e
...
...
@@ -65,7 +65,7 @@ OPTION(DEBUG_POOL "Enable debug pool allocator" OFF)
OPTION
(
ENABLE_WERROR
"Enable compilation with -Werror"
OFF
)
OPTION
(
USE_BUNDLED_ZLIB
"Use the bundled version of zlib"
OFF
)
OPTION
(
DEPRECATE_HARD
"Do not include deprecated functions in the library"
OFF
)
SET
(
REGEX
""
CACHE STRING
"Regular expression implementation. One of regcomp_l, pcre2, pcre, regcomp, or builtin."
)
SET
(
REGEX
_BACKEND
""
CACHE STRING
"Regular expression implementation. One of regcomp_l, pcre2, pcre, regcomp, or builtin."
)
IF
(
UNIX AND NOT APPLE
)
OPTION
(
ENABLE_REPRODUCIBLE_BUILDS
"Enable reproducible builds"
OFF
)
...
...
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
View file @
ac2b235e
...
...
@@ -292,22 +292,22 @@ ENDIF()
# Specify regular expression implementation
FIND_PACKAGE(PCRE)
IF(REGEX STREQUAL "")
IF(REGEX
_BACKEND
STREQUAL "")
CHECK_SYMBOL_EXISTS(regcomp_l "
regex.h;xlocale.h
" HAVE_REGCOMP_L)
IF(HAVE_REGCOMP_L)
SET(REGEX "
regcomp_l
")
SET(REGEX
_BACKEND
"
regcomp_l
")
ELSEIF(PCRE_FOUND)
SET(REGEX "
pcre
")
SET(REGEX
_BACKEND
"
pcre
")
ELSE()
SET(REGEX "
builtin
")
SET(REGEX
_BACKEND
"
builtin
")
ENDIF()
ENDIF()
IF(REGEX STREQUAL "
regcomp_l
")
IF(REGEX
_BACKEND
STREQUAL "
regcomp_l
")
ADD_FEATURE_INFO(regex ON "
using system regcomp_l
")
SET(GIT_REGEX_REGCOMP_L 1)
ELSEIF(REGEX STREQUAL "
pcre2
")
ELSEIF(REGEX
_BACKEND
STREQUAL "
pcre2
")
FIND_PACKAGE(PCRE2)
IF(NOT PCRE2_FOUND)
...
...
@@ -319,16 +319,16 @@ ELSEIF(REGEX STREQUAL "pcre2")
LIST(APPEND LIBGIT2_SYSTEM_INCLUDES
${
PCRE2_INCLUDE_DIRS
}
)
LIST(APPEND LIBGIT2_LIBS
${
PCRE2_LIBRARIES
}
)
ELSEIF(REGEX STREQUAL "
pcre
")
ELSEIF(REGEX
_BACKEND
STREQUAL "
pcre
")
ADD_FEATURE_INFO(regex ON "
using system PCRE
")
SET(GIT_REGEX_PCRE 1)
LIST(APPEND LIBGIT2_SYSTEM_INCLUDES
${
PCRE_INCLUDE_DIRS
}
)
LIST(APPEND LIBGIT2_LIBS
${
PCRE_LIBRARIES
}
)
ELSEIF(REGEX STREQUAL "
regcomp
")
ELSEIF(REGEX
_BACKEND
STREQUAL "
regcomp
")
ADD_FEATURE_INFO(regex ON "
using system regcomp
")
SET(GIT_REGEX_REGCOMP 1)
ELSEIF(REGEX STREQUAL "
builtin
")
ELSEIF(REGEX
_BACKEND
STREQUAL "
builtin
")
ADD_FEATURE_INFO(regex ON "
using bundled PCRE
")
SET(GIT_REGEX_BUILTIN 1)
...
...
@@ -336,7 +336,7 @@ ELSEIF(REGEX STREQUAL "builtin")
LIST(APPEND LIBGIT2_INCLUDES "
${
libgit2_SOURCE_DIR
}
/deps/pcre
")
LIST(APPEND LIBGIT2_OBJECTS $<TARGET_OBJECTS:pcre>)
ELSE()
MESSAGE(FATAL_ERROR "
The REGEX option provided is not supported
")
MESSAGE(FATAL_ERROR "
The REGEX
_BACKEND
option provided is not supported
")
ENDIF()
# Optional external dependency: http-parser
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment