From cff5e3ee88c4208ecbec5607ded7428ccfb0357f Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Fri, 19 Sep 2014 12:09:53 +0400 Subject: [PATCH 1/2] Changed java tests detection procedure --- CMakeLists.txt | 3 ++- modules/java/android_test/CMakeLists.txt | 8 +++++++- modules/java/test/CMakeLists.txt | 8 +++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d4afe3ed70..b8b560c844 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1043,7 +1043,8 @@ status(" ant:" ANT_EXECUTABLE THEN "${ANT_EXECUTABLE} (ver ${A if(NOT ANDROID) status(" JNI:" JNI_INCLUDE_DIRS THEN "${JNI_INCLUDE_DIRS}" ELSE NO) endif() -status(" Java tests:" BUILD_TESTS AND (CAN_BUILD_ANDROID_PROJECTS OR HAVE_opencv_java) THEN YES ELSE NO) +status(" Java wrappers:" HAVE_opencv_java THEN YES ELSE NO) +status(" Java tests:" BUILD_TESTS AND opencv_test_java_BINARY_DIR THEN YES ELSE NO) # ========================= matlab ========================= status("") diff --git a/modules/java/android_test/CMakeLists.txt b/modules/java/android_test/CMakeLists.txt index 7a55b8ada7..8b1b24b18d 100644 --- a/modules/java/android_test/CMakeLists.txt +++ b/modules/java/android_test/CMakeLists.txt @@ -1,4 +1,10 @@ -ocv_check_dependencies(opencv_java ${OPENCV_MODULE_opencv_java_OPT_DEPS} ${OPENCV_MODULE_opencv_java_REQ_DEPS}) +# list of modules covered with tests +set(tested_modules opencv_calib3d opencv_core opencv_features2d opencv_highgui opencv_imgproc opencv_objdetect opencv_photo opencv_video opencv_android) + +# opencv_ml is broken +#list(APPEND tested_modules opencv_ml) + +ocv_check_dependencies(opencv_java ${tested_modules}) if(NOT OCV_DEPENDENCIES_FOUND OR NOT ANT_EXECUTABLE OR NOT ANDROID_EXECUTABLE OR NOT ANDROID_TOOLS_Pkg_Revision GREATER 13) return() diff --git a/modules/java/test/CMakeLists.txt b/modules/java/test/CMakeLists.txt index 4a40ce2710..4f1b422eb0 100644 --- a/modules/java/test/CMakeLists.txt +++ b/modules/java/test/CMakeLists.txt @@ -1,4 +1,10 @@ -ocv_check_dependencies(opencv_java ${OPENCV_MODULE_opencv_java_OPT_DEPS} ${OPENCV_MODULE_opencv_java_REQ_DEPS}) +# list of modules covered with tests +set(tested_modules opencv_calib3d opencv_core opencv_features2d opencv_highgui opencv_imgproc opencv_objdetect opencv_photo opencv_video) + +# opencv_ml is broken +#list(APPEND tested_modules opencv_ml) + +ocv_check_dependencies(opencv_java ${tested_modules}) if(NOT OCV_DEPENDENCIES_FOUND) return() From 2992e3a1b60f396a3953ab5af45b1627275bbfa1 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Fri, 19 Sep 2014 13:10:14 +0400 Subject: [PATCH 2/2] Fixed android test detection and some spaces in CMakeLists.txt --- CMakeLists.txt | 2 +- modules/java/android_test/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b8b560c844..5301f826da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1044,7 +1044,7 @@ if(NOT ANDROID) status(" JNI:" JNI_INCLUDE_DIRS THEN "${JNI_INCLUDE_DIRS}" ELSE NO) endif() status(" Java wrappers:" HAVE_opencv_java THEN YES ELSE NO) -status(" Java tests:" BUILD_TESTS AND opencv_test_java_BINARY_DIR THEN YES ELSE NO) +status(" Java tests:" BUILD_TESTS AND opencv_test_java_BINARY_DIR THEN YES ELSE NO) # ========================= matlab ========================= status("") diff --git a/modules/java/android_test/CMakeLists.txt b/modules/java/android_test/CMakeLists.txt index 8b1b24b18d..d1a26bf6cb 100644 --- a/modules/java/android_test/CMakeLists.txt +++ b/modules/java/android_test/CMakeLists.txt @@ -1,5 +1,5 @@ # list of modules covered with tests -set(tested_modules opencv_calib3d opencv_core opencv_features2d opencv_highgui opencv_imgproc opencv_objdetect opencv_photo opencv_video opencv_android) +set(tested_modules opencv_calib3d opencv_core opencv_features2d opencv_highgui opencv_imgproc opencv_objdetect opencv_photo opencv_video) # opencv_ml is broken #list(APPEND tested_modules opencv_ml)