From daa3e0d059dcaf06abd1db7c716bc2ea2e15cc01 Mon Sep 17 00:00:00 2001 From: tqcq <99722391+tqcq@users.noreply.github.com> Date: Sun, 3 Dec 2023 12:21:04 +0800 Subject: [PATCH] feature use specify GIT_REPOSITORY for anltr4 --- cmake/ExternalAntlr4Cpp.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/ExternalAntlr4Cpp.cmake b/cmake/ExternalAntlr4Cpp.cmake index f53e855..4689ae1 100644 --- a/cmake/ExternalAntlr4Cpp.cmake +++ b/cmake/ExternalAntlr4Cpp.cmake @@ -8,7 +8,9 @@ include(ExternalProject) set(ANTLR4_ROOT ${CMAKE_CURRENT_BINARY_DIR}/antlr4_runtime/src/antlr4_runtime) set(ANTLR4_INCLUDE_DIRS ${ANTLR4_ROOT}/runtime/Cpp/runtime/src) -set(ANTLR4_GIT_REPOSITORY https://github.com/antlr/antlr4.git) +if (NOT DEFINED ANTLR4_GIT_REPOSITORY) + set(ANTLR4_GIT_REPOSITORY https://github.com/antlr/antlr4.git) +endif() if(NOT DEFINED ANTLR4_TAG) # Set to branch name to keep library updated at the cost of needing to rebuild after 'clean' # Set to commit hash to keep the build stable and does not need to rebuild after 'clean'