diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-06-18 16:49:17 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-06-18 20:09:16 +0400 |
commit | 306cbb82ecf0d7c1ba4fb0a1240175b1976bd25b (patch) | |
tree | e9eac65bf57126ac233f22fe88cc00df137ec4e5 /extern/libmv/CMakeLists.txt | |
parent | 47ec0394ca3d03e07c07a67e8f8d1625aedd39dd (diff) |
GTest unit testing framework
Currently covers only small set of functionality.
Diffstat (limited to 'extern/libmv/CMakeLists.txt')
-rw-r--r-- | extern/libmv/CMakeLists.txt | 112 |
1 files changed, 87 insertions, 25 deletions
diff --git a/extern/libmv/CMakeLists.txt b/extern/libmv/CMakeLists.txt index c3c5143cc16..62b387e8968 100644 --- a/extern/libmv/CMakeLists.txt +++ b/extern/libmv/CMakeLists.txt @@ -30,6 +30,9 @@ set(INC . ) +set(INC_SYS +) + set(SRC libmv-capi.h libmv-capi_intern.h @@ -67,6 +70,7 @@ if(WITH_LIBMV) libmv/multiview/fundamental.cc libmv/multiview/homography.cc libmv/multiview/panography.cc + libmv/multiview/panography_kernel.cc libmv/multiview/projection.cc libmv/multiview/triangulation.cc libmv/numeric/numeric.cc @@ -92,10 +96,6 @@ if(WITH_LIBMV) libmv/tracking/track_region.cc libmv/tracking/trklt_region_tracker.cc - third_party/gflags/gflags.cc - third_party/gflags/gflags_completions.cc - third_party/gflags/gflags_reporting.cc - libmv-util.h libmv/base/aligned_malloc.h libmv/base/id_generator.h @@ -106,6 +106,7 @@ if(WITH_LIBMV) libmv/image/convolve.h libmv/image/correlation.h libmv/image/image_converter.h + libmv/image/image_drawing.h libmv/image/image.h libmv/image/sample.h libmv/image/tuple.h @@ -113,13 +114,16 @@ if(WITH_LIBMV) libmv/multiview/conditioning.h libmv/multiview/euclidean_resection.h libmv/multiview/fundamental.h + libmv/multiview/homography_error.h libmv/multiview/homography.h libmv/multiview/homography_parameterization.h libmv/multiview/nviewtriangulation.h libmv/multiview/panography.h + libmv/multiview/panography_kernel.h libmv/multiview/projection.h libmv/multiview/resection.h libmv/multiview/triangulation.h + libmv/multiview/two_view_kernel.h libmv/numeric/dogleg.h libmv/numeric/function_derivative.h libmv/numeric/levenberg_marquardt.h @@ -149,18 +153,86 @@ if(WITH_LIBMV) libmv/tracking/track_region.h libmv/tracking/trklt_region_tracker.h + third_party/msinttypes/inttypes.h + third_party/msinttypes/stdint.h + ) + + if(WIN32) + list(APPEND INC + third_party/glog/src/windows + ) + + if(NOT MINGW) + list(APPEND INC + third_party/msinttypes + ) + endif() + endif() + + if(WITH_TESTS) + blender_add_lib(libmv_test_dataset "./libmv/multiview/test_data_sets.cc" "" "") + endif() + + BLENDER_SRC_GTEST("libmv_scoped_ptr" "./libmv/base/scoped_ptr_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_vector" "./libmv/base/vector_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_array_nd" "./libmv/image/array_nd_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_convolve" "./libmv/image/convolve_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_image" "./libmv/image/image_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_sample" "./libmv/image/sample_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_tuple" "./libmv/image/tuple_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_euclidean_resection" "./libmv/multiview/euclidean_resection_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_fundamental" "./libmv/multiview/fundamental_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_homography" "./libmv/multiview/homography_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_nviewtriangulation" "./libmv/multiview/nviewtriangulation_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_panography" "./libmv/multiview/panography_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_projection" "./libmv/multiview/projection_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_resection" "./libmv/multiview/resection_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_triangulation" "./libmv/multiview/triangulation_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_dogleg" "./libmv/numeric/dogleg_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_function_derivative" "./libmv/numeric/function_derivative_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_levenberg_marquardt" "./libmv/numeric/levenberg_marquardt_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_numeric" "./libmv/numeric/numeric_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_poly" "./libmv/numeric/poly_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_camera_intrinsics" "./libmv/simple_pipeline/camera_intrinsics_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_detect" "./libmv/simple_pipeline/detect_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_intersect" "./libmv/simple_pipeline/intersect_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_keyframe_selection" "./libmv/simple_pipeline/keyframe_selection_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_modal_solver" "./libmv/simple_pipeline/modal_solver_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_resect" "./libmv/simple_pipeline/resect_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_brute_region_tracker" "./libmv/tracking/brute_region_tracker_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_klt_region_tracker" "./libmv/tracking/klt_region_tracker_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") + BLENDER_SRC_GTEST("libmv_pyramid_region_tracker" "./libmv/tracking/pyramid_region_tracker_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres") +else() + list(APPEND SRC + libmv-capi_stub.cc + ) +endif() + +blender_add_lib(extern_libmv "${SRC}" "${INC}" "${INC_SYS}") + +if(WITH_LIBMV) + add_subdirectory(third_party) +endif() + +# make GLog a separate target, so it can be used for gtest as well. +if(WITH_LIBMV OR WITH_TESTS) + # We compile GLog together with GFlag so we don't worry about + # adding extra lib to linker. + set(GLOG_SRC + third_party/gflags/gflags.cc + third_party/gflags/gflags_completions.cc + third_party/gflags/gflags_reporting.cc + third_party/gflags/config.h third_party/gflags/gflags/gflags_completions.h third_party/gflags/gflags/gflags_declare.h third_party/gflags/gflags/gflags.h third_party/gflags/mutex.h third_party/gflags/util.h - third_party/msinttypes/inttypes.h - third_party/msinttypes/stdint.h ) if(WIN32) - list(APPEND SRC + list(APPEND GLOG_SRC third_party/glog/src/logging.cc third_party/glog/src/raw_logging.cc third_party/glog/src/utilities.cc @@ -185,18 +257,8 @@ if(WITH_LIBMV) third_party/glog/src/windows/port.h third_party/glog/src/windows/config.h ) - - list(APPEND INC - third_party/glog/src/windows - ) - - if(NOT MINGW) - list(APPEND INC - third_party/msinttypes - ) - endif() else() - list(APPEND SRC + list(APPEND GLOG_SRC third_party/glog/src/demangle.cc third_party/glog/src/logging.cc third_party/glog/src/raw_logging.cc @@ -228,14 +290,14 @@ if(WITH_LIBMV) third_party/glog/src/utilities.h ) endif() -else() - list(APPEND SRC - libmv-capi_stub.cc + + set(GLOG_INC + third_party/gflags + third_party/glog/src ) -endif() -blender_add_lib(extern_libmv "${SRC}" "${INC}" "${INC_SYS}") + set(GLOG_INC_SYS + ) -if(WITH_LIBMV) - add_subdirectory(third_party) + blender_add_lib(extern_glog "${GLOG_SRC}" "${GLOG_INC}" "${GLOG_INC_SYS}") endif() |