Skip to content

Commit 33dc680

Browse files
authored
Add support for git tags (#12)
1 parent 1c9de21 commit 33dc680

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

vendor/CMakeLists.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ include(ExternalProject)
66
# @param[in] URL Used URL to download the sources. Git repositories have to contain `.git` for identification.
77
# @param[in] ARGN All preceeding arguments are forwareded to `CMAKE_ARGS`, if external project uses cmake
88
# for configuration, or `CONFIGURE_COMMAND`.
9-
function(AddExternalProject NAME LIB_NAME URL)
9+
function(AddExternalProject NAME LIB_NAME URL TAG)
1010
string(TOUPPER ${NAME} UP_NAME)
1111

1212
set(INCLUDE_${UP_NAME} "local" CACHE STRING "Use ${NAME} library form local built, system or disable usage.")
@@ -24,6 +24,7 @@ function(AddExternalProject NAME LIB_NAME URL)
2424
ExternalProject_Add(
2525
lib${NAME}
2626
GIT_REPOSITORY ${URL}
27+
GIT_TAG ${TAG}
2728
PREFIX ${CMAKE_CURRENT_SOURCE_DIR}
2829
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${NAME}
2930
TMP_DIR ${PROJECT_BINARY_DIR}/${NAME}-tmp
@@ -75,6 +76,7 @@ AddExternalProject(
7576
"hyperscan"
7677
"hs"
7778
"https://github.com/01org/hyperscan.git"
79+
"master"
7880
-DCMAKE_BUILD_TYPE=Release -DFAT_RUNTIME=OFF -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_SOURCE_DIR}/local
7981
)
8082

@@ -83,6 +85,7 @@ AddExternalProject(
8385
"oniguruma"
8486
"onig"
8587
"https://github.com/kkos/oniguruma.git"
88+
"master"
8689
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_SOURCE_DIR}/local
8790
)
8891

@@ -91,6 +94,7 @@ AddExternalProject(
9194
"re2"
9295
"re2"
9396
"https://github.com/google/re2.git"
97+
"main"
9498
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_SOURCE_DIR}/local
9599
)
96100

@@ -99,13 +103,15 @@ AddExternalProject(
99103
"tre"
100104
"tre"
101105
"https://github.com/laurikari/tre.git"
106+
"master"
102107
cd ${CMAKE_CURRENT_SOURCE_DIR}/tre/ && ./utils/autogen.sh && cd ${PROJECT_BINARY_DIR}/tre-build && ${CMAKE_CURRENT_SOURCE_DIR}/tre/configure --prefix=${CMAKE_CURRENT_SOURCE_DIR}/local
103108
)
104109

105110
# pcre2
106111
AddExternalProject(
107112
"pcre2"
108113
"pcre2-8"
109-
"https://ftp.pcre.org/pub/pcre/pcre2-10.23.tar.gz"
110-
${CMAKE_CURRENT_SOURCE_DIR}/pcre2/configure --prefix=${CMAKE_CURRENT_SOURCE_DIR}/local --enable-unicode --enable-jit
114+
"https://github.com/PhilipHazel/pcre2.git"
115+
"master"
116+
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_SOURCE_DIR}/local -DPCRE2_SUPPORT_JIT=ON
111117
)

0 commit comments

Comments
 (0)