summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2021-04-20 10:49:25 -0700
committerAndres Noetzli <andres.noetzli@gmail.com>2021-04-20 10:49:25 -0700
commit956f522a99ab14760b0645b9ebcc3d3e244c0cb9 (patch)
tree481beea8d9e9870de9273c6bf453542d5b01e868
parent29d19c62ff1a65665f852134c24c17cca45251cd (diff)
Fix `ANTLR3_COMMAND` for system ANTLR3 JARfixANTLR
`ANTLR3_COMMAND` was using a fixed path instead of relying on the `ANTLR3_JAR` variable. If the ANTLR3 JAR was found on the system (for example due to an existing `deps` folder at the root of the CVC4 folder), then the command would fail because the JAR was not at the expected location. This commit changes the command to use the variable and prints the location of the JAR file to make debugging easier.
-rw-r--r--cmake/FindANTLR3.cmake5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmake/FindANTLR3.cmake b/cmake/FindANTLR3.cmake
index 8b05c1dc7..5429be99a 100644
--- a/cmake/FindANTLR3.cmake
+++ b/cmake/FindANTLR3.cmake
@@ -108,8 +108,7 @@ set(ANTLR3_FOUND TRUE)
# This may not be a single binary: the EP has a whole commandline
# We thus do not make this an executable target.
# Just call ${ANTLR3_COMMAND} instead.
-set(ANTLR3_COMMAND ${Java_JAVA_EXECUTABLE} -cp
- "${DEPS_BASE}/share/java/antlr-3.4-complete.jar" org.antlr.Tool
+set(ANTLR3_COMMAND ${Java_JAVA_EXECUTABLE} -cp "${ANTLR3_JAR}" org.antlr.Tool
CACHE STRING "run ANTLR3" FORCE)
add_library(ANTLR3 STATIC IMPORTED GLOBAL)
@@ -126,7 +125,9 @@ mark_as_advanced(ANTLR3_RUNTIME)
if(ANTLR3_FOUND_SYSTEM)
message(STATUS "Found ANTLR3 runtime: ${ANTLR3_RUNTIME}")
+ message(STATUS "Found ANTLR3 JAR: ${ANTLR3_JAR}")
else()
message(STATUS "Building ANTLR3 runtime: ${ANTLR3_RUNTIME}")
+ message(STATUS "Downloading ANTLR3 JAR: ${ANTLR3_JAR}")
add_dependencies(ANTLR3 ANTLR3-EP-runtime ANTLR3-EP-jar)
endif()
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback