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'