Skip to content

Commit

Permalink
TEST: #104 prolog_in_java test fails if multiple copies of junit*.jar…
Browse files Browse the repository at this point in the history
… are found.

Now first search for junit*4*.jar.  On success, use first, else search
for junit.jar.  On success, use first.
  • Loading branch information
JanWielemaker committed Nov 22, 2024
1 parent 46364f2 commit e3be306
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions cmake/JUnit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,21 @@
# Unfortunately, find_file() does not allow for wildcarts
if(NOT JUNIT_JAR)
file(GLOB F_JUNIT_JAR
${JAVA_LIB_INSTALL_DIR}/junit4.jar
${JAVA_LIB_INSTALL_DIR}/junit-4*.jar
/usr/share/java/junit4.jar
/usr/share/java/junit-4*.jar
/usr/share/java/junit.jar
/opt/local/share/java/junit.jar # Macport
/opt/local/share/java/junit4.jar
/opt/local/share/java/junit-4*.jar
/usr/local/share/java/junit4.jar
/usr/local/share/java/junit-4*.jar)
${JAVA_LIB_INSTALL_DIR}/junit4.jar
${JAVA_LIB_INSTALL_DIR}/junit-4*.jar
/usr/share/java/junit4.jar
/usr/share/java/junit-4*.jar
/opt/local/share/java/junit4.jar
/opt/local/share/java/junit-4*.jar
/usr/local/share/java/junit4.jar
/usr/local/share/java/junit-4*.jar)
if(NOT F_JUNIT_JAR)
file(GLOB F_JUNIT_JAR
/usr/share/java/junit.jar
/opt/local/share/java/junit.jar)
endif()
if(F_JUNIT_JAR)
list(GET F_JUNIT_JAR 0 F_JUNIT_JAR)
message("Found junit at ${F_JUNIT_JAR}")
else()
message("Could not find junit.jar.")
Expand Down

0 comments on commit e3be306

Please sign in to comment.