]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: fix libcephfs-test.jar build failure 20250/head
authorTone Zhang <tone.zhang@arm.com>
Tue, 30 Jan 2018 00:55:38 +0000 (00:55 +0000)
committerNathan Cutler <ncutler@suse.com>
Fri, 2 Feb 2018 04:35:38 +0000 (05:35 +0100)
When building Ceph Debian installation package, libcephfs-test.jar
build would fail if multi junit versions are installed on the host.

In src/java/CMakeLists.txt, the "junit" search order is "junit"
and then "junit4". In case multi junit versions are installed,
the lower version (like 3.8) is found firstly, but junit4 is
required only. The search result will cause the failure.

Fix the issue by change search order to firstly search junit4
by default.

Fixes: http://tracker.ceph.com/issues/22828
Signed-off-by: Tone Zhang <tone.zhang@arm.com>
(cherry picked from commit 108ac2ca1ca88af272842fc25a8d412d2607194c)

src/java/CMakeLists.txt

index 17e08d8677ebdb592883a424eab69c1c4609e571..5276bc2c1ddb5d28b407f6aa523aa5ece7e82106 100644 (file)
@@ -36,7 +36,7 @@ add_custom_target(
 add_dependencies(jni-header libcephfs)
 
 find_jar(JUNIT_JAR
-  NAMES junit junit4
+  NAMES junit4 junit
   PATHS "/usr/share/java")
 if(JUNIT_JAR)
   set(CMAKE_JAVA_INCLUDE_PATH ${JUNIT_JAR} ${libcephfs_jar})