3 ## Top contributors (to current version):
5 ## This file is part of the CVC4 project.
6 ## Copyright (c) 2009-2020 by the authors listed in the file AUTHORS
7 ## in the top-level source directory and their institutional affiliations.
8 ## All rights reserved. See the file COPYING in the top-level source
9 ## directory for licensing information.
12 # JUnit_FOUND - system has JUnit lib
13 # JUnit_JAR - JUnit jar file
14 # JUnit_JAR_DEPS - JUnit jar dependencies
16 find_package(Java REQUIRED)
18 find_package(Hamcrest REQUIRED)
20 find_jar(JUnit_JAR NAMES junit junit4)
23 set(JUnit_JAR_DEPS ${Hamcrest_JAR})
24 # Determine version of JUnit
26 COMMAND ${Java_JAVA_EXECUTABLE} -cp ${JUnit_JAR} junit.runner.Version
27 OUTPUT_VARIABLE JUnit_VERSION
28 OUTPUT_STRIP_TRAILING_WHITESPACE)
31 include(FindPackageHandleStandardArgs)
32 find_package_handle_standard_args(JUnit
33 REQUIRED_VARS JUnit_JAR JUnit_JAR_DEPS
34 VERSION_VAR JUnit_VERSION)
36 mark_as_advanced(JUnit_JAR JUnit_JAR_DEPS)