forked from bartvdbraak/blender
d05f5da111
This brings a fixes for threading issue in BLAS making BA step more robust (there were some in-detemrinacy caused by this threading issue). Also brings some optimizations, which does not directly affect on blender.
296 lines
9.3 KiB
CMake
296 lines
9.3 KiB
CMake
# ***** BEGIN GPL LICENSE BLOCK *****
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU General Public License
|
|
# as published by the Free Software Foundation; either version 2
|
|
# of the License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software Foundation,
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
#
|
|
# The Original Code is Copyright (C) 2012, Blender Foundation
|
|
# All rights reserved.
|
|
#
|
|
# Contributor(s): Blender Foundation,
|
|
# Sergey Sharybin
|
|
#
|
|
# ***** END GPL LICENSE BLOCK *****
|
|
|
|
# NOTE: This file is automatically generated by bundle.sh script
|
|
# If you're doing changes in this file, please update template
|
|
# in that script too
|
|
|
|
set(INC
|
|
.
|
|
include
|
|
internal
|
|
../gflags
|
|
../../
|
|
)
|
|
|
|
set(INC_SYS
|
|
../../../Eigen3
|
|
)
|
|
|
|
set(SRC
|
|
internal/ceres/array_utils.cc
|
|
internal/ceres/block_evaluate_preparer.cc
|
|
internal/ceres/block_jacobian_writer.cc
|
|
internal/ceres/block_jacobi_preconditioner.cc
|
|
internal/ceres/block_random_access_dense_matrix.cc
|
|
internal/ceres/block_random_access_matrix.cc
|
|
internal/ceres/block_random_access_sparse_matrix.cc
|
|
internal/ceres/block_sparse_matrix.cc
|
|
internal/ceres/block_structure.cc
|
|
internal/ceres/canonical_views_clustering.cc
|
|
internal/ceres/cgnr_solver.cc
|
|
internal/ceres/compressed_row_jacobian_writer.cc
|
|
internal/ceres/compressed_row_sparse_matrix.cc
|
|
internal/ceres/conditioned_cost_function.cc
|
|
internal/ceres/conjugate_gradients_solver.cc
|
|
internal/ceres/coordinate_descent_minimizer.cc
|
|
internal/ceres/corrector.cc
|
|
internal/ceres/cxsparse.cc
|
|
internal/ceres/dense_normal_cholesky_solver.cc
|
|
internal/ceres/dense_qr_solver.cc
|
|
internal/ceres/dense_sparse_matrix.cc
|
|
internal/ceres/detect_structure.cc
|
|
internal/ceres/dogleg_strategy.cc
|
|
internal/ceres/evaluator.cc
|
|
internal/ceres/file.cc
|
|
internal/ceres/generated/schur_eliminator_d_d_d.cc
|
|
internal/ceres/gradient_checking_cost_function.cc
|
|
internal/ceres/implicit_schur_complement.cc
|
|
internal/ceres/iterative_schur_complement_solver.cc
|
|
internal/ceres/levenberg_marquardt_strategy.cc
|
|
internal/ceres/linear_least_squares_problems.cc
|
|
internal/ceres/linear_operator.cc
|
|
internal/ceres/linear_solver.cc
|
|
internal/ceres/line_search.cc
|
|
internal/ceres/line_search_direction.cc
|
|
internal/ceres/line_search_minimizer.cc
|
|
internal/ceres/local_parameterization.cc
|
|
internal/ceres/loss_function.cc
|
|
internal/ceres/low_rank_inverse_hessian.cc
|
|
internal/ceres/minimizer.cc
|
|
internal/ceres/normal_prior.cc
|
|
internal/ceres/parameter_block_ordering.cc
|
|
internal/ceres/partitioned_matrix_view.cc
|
|
internal/ceres/polynomial.cc
|
|
internal/ceres/preconditioner.cc
|
|
internal/ceres/problem.cc
|
|
internal/ceres/problem_impl.cc
|
|
internal/ceres/program.cc
|
|
internal/ceres/residual_block.cc
|
|
internal/ceres/residual_block_utils.cc
|
|
internal/ceres/runtime_numeric_diff_cost_function.cc
|
|
internal/ceres/schur_complement_solver.cc
|
|
internal/ceres/schur_eliminator.cc
|
|
internal/ceres/schur_jacobi_preconditioner.cc
|
|
internal/ceres/scratch_evaluate_preparer.cc
|
|
internal/ceres/solver.cc
|
|
internal/ceres/solver_impl.cc
|
|
internal/ceres/sparse_matrix.cc
|
|
internal/ceres/sparse_normal_cholesky_solver.cc
|
|
internal/ceres/split.cc
|
|
internal/ceres/stringprintf.cc
|
|
internal/ceres/suitesparse.cc
|
|
internal/ceres/triplet_sparse_matrix.cc
|
|
internal/ceres/trust_region_minimizer.cc
|
|
internal/ceres/trust_region_strategy.cc
|
|
internal/ceres/types.cc
|
|
internal/ceres/visibility_based_preconditioner.cc
|
|
internal/ceres/visibility.cc
|
|
internal/ceres/wall_time.cc
|
|
|
|
include/ceres/autodiff_cost_function.h
|
|
include/ceres/autodiff_local_parameterization.h
|
|
include/ceres/ceres.h
|
|
include/ceres/conditioned_cost_function.h
|
|
include/ceres/cost_function.h
|
|
include/ceres/cost_function_to_functor.h
|
|
include/ceres/crs_matrix.h
|
|
include/ceres/dynamic_autodiff_cost_function.h
|
|
include/ceres/fpclassify.h
|
|
include/ceres/gradient_checker.h
|
|
include/ceres/internal/autodiff.h
|
|
include/ceres/internal/eigen.h
|
|
include/ceres/internal/fixed_array.h
|
|
include/ceres/internal/macros.h
|
|
include/ceres/internal/manual_constructor.h
|
|
include/ceres/internal/numeric_diff.h
|
|
include/ceres/internal/port.h
|
|
include/ceres/internal/scoped_ptr.h
|
|
include/ceres/internal/variadic_evaluate.h
|
|
include/ceres/iteration_callback.h
|
|
include/ceres/jet.h
|
|
include/ceres/local_parameterization.h
|
|
include/ceres/loss_function.h
|
|
include/ceres/normal_prior.h
|
|
include/ceres/numeric_diff_cost_function.h
|
|
include/ceres/numeric_diff_functor.h
|
|
include/ceres/ordered_groups.h
|
|
include/ceres/problem.h
|
|
include/ceres/rotation.h
|
|
include/ceres/sized_cost_function.h
|
|
include/ceres/solver.h
|
|
include/ceres/types.h
|
|
internal/ceres/array_utils.h
|
|
internal/ceres/blas.h
|
|
internal/ceres/block_evaluate_preparer.h
|
|
internal/ceres/block_jacobian_writer.h
|
|
internal/ceres/block_jacobi_preconditioner.h
|
|
internal/ceres/block_random_access_dense_matrix.h
|
|
internal/ceres/block_random_access_matrix.h
|
|
internal/ceres/block_random_access_sparse_matrix.h
|
|
internal/ceres/block_sparse_matrix.h
|
|
internal/ceres/block_structure.h
|
|
internal/ceres/canonical_views_clustering.h
|
|
internal/ceres/casts.h
|
|
internal/ceres/cgnr_linear_operator.h
|
|
internal/ceres/cgnr_solver.h
|
|
internal/ceres/collections_port.h
|
|
internal/ceres/compressed_row_jacobian_writer.h
|
|
internal/ceres/compressed_row_sparse_matrix.h
|
|
internal/ceres/conjugate_gradients_solver.h
|
|
internal/ceres/coordinate_descent_minimizer.h
|
|
internal/ceres/corrector.h
|
|
internal/ceres/cxsparse.h
|
|
internal/ceres/dense_jacobian_writer.h
|
|
internal/ceres/dense_normal_cholesky_solver.h
|
|
internal/ceres/dense_qr_solver.h
|
|
internal/ceres/dense_sparse_matrix.h
|
|
internal/ceres/detect_structure.h
|
|
internal/ceres/dogleg_strategy.h
|
|
internal/ceres/evaluator.h
|
|
internal/ceres/execution_summary.h
|
|
internal/ceres/file.h
|
|
internal/ceres/gradient_checking_cost_function.h
|
|
internal/ceres/graph_algorithms.h
|
|
internal/ceres/graph.h
|
|
internal/ceres/implicit_schur_complement.h
|
|
internal/ceres/integral_types.h
|
|
internal/ceres/iterative_schur_complement_solver.h
|
|
internal/ceres/levenberg_marquardt_strategy.h
|
|
internal/ceres/linear_least_squares_problems.h
|
|
internal/ceres/linear_operator.h
|
|
internal/ceres/linear_solver.h
|
|
internal/ceres/line_search_direction.h
|
|
internal/ceres/line_search.h
|
|
internal/ceres/line_search_minimizer.h
|
|
internal/ceres/low_rank_inverse_hessian.h
|
|
internal/ceres/map_util.h
|
|
internal/ceres/matrix_proto.h
|
|
internal/ceres/minimizer.h
|
|
internal/ceres/mutex.h
|
|
internal/ceres/parameter_block.h
|
|
internal/ceres/parameter_block_ordering.h
|
|
internal/ceres/partitioned_matrix_view.h
|
|
internal/ceres/polynomial.h
|
|
internal/ceres/preconditioner.h
|
|
internal/ceres/problem_impl.h
|
|
internal/ceres/program_evaluator.h
|
|
internal/ceres/program.h
|
|
internal/ceres/random.h
|
|
internal/ceres/residual_block.h
|
|
internal/ceres/residual_block_utils.h
|
|
internal/ceres/runtime_numeric_diff_cost_function.h
|
|
internal/ceres/schur_complement_solver.h
|
|
internal/ceres/schur_eliminator.h
|
|
internal/ceres/schur_eliminator_impl.h
|
|
internal/ceres/schur_jacobi_preconditioner.h
|
|
internal/ceres/scratch_evaluate_preparer.h
|
|
internal/ceres/solver_impl.h
|
|
internal/ceres/sparse_matrix.h
|
|
internal/ceres/sparse_normal_cholesky_solver.h
|
|
internal/ceres/split.h
|
|
internal/ceres/stl_util.h
|
|
internal/ceres/stringprintf.h
|
|
internal/ceres/suitesparse.h
|
|
internal/ceres/triplet_sparse_matrix.h
|
|
internal/ceres/trust_region_minimizer.h
|
|
internal/ceres/trust_region_strategy.h
|
|
internal/ceres/visibility_based_preconditioner.h
|
|
internal/ceres/visibility.h
|
|
internal/ceres/wall_time.h
|
|
)
|
|
|
|
#if(FALSE)
|
|
# list(APPEND SRC
|
|
# internal/ceres/generated/schur_eliminator_2_2_2.cc
|
|
# internal/ceres/generated/schur_eliminator_2_2_3.cc
|
|
# internal/ceres/generated/schur_eliminator_2_2_4.cc
|
|
# internal/ceres/generated/schur_eliminator_2_2_d.cc
|
|
# internal/ceres/generated/schur_eliminator_2_3_3.cc
|
|
# internal/ceres/generated/schur_eliminator_2_3_4.cc
|
|
# internal/ceres/generated/schur_eliminator_2_3_9.cc
|
|
# internal/ceres/generated/schur_eliminator_2_3_d.cc
|
|
# internal/ceres/generated/schur_eliminator_2_4_3.cc
|
|
# internal/ceres/generated/schur_eliminator_2_4_4.cc
|
|
# internal/ceres/generated/schur_eliminator_2_4_d.cc
|
|
# internal/ceres/generated/schur_eliminator_4_4_2.cc
|
|
# internal/ceres/generated/schur_eliminator_4_4_3.cc
|
|
# internal/ceres/generated/schur_eliminator_4_4_4.cc
|
|
# internal/ceres/generated/schur_eliminator_4_4_d.cc
|
|
# )
|
|
#endif()
|
|
|
|
if(WIN32)
|
|
list(APPEND INC
|
|
../glog/src/windows
|
|
)
|
|
|
|
if(NOT MINGW)
|
|
list(APPEND INC
|
|
../msinttypes
|
|
)
|
|
endif()
|
|
else()
|
|
list(APPEND INC
|
|
../glog/src
|
|
)
|
|
endif()
|
|
|
|
add_definitions(
|
|
-DCERES_HAVE_PTHREAD
|
|
-DCERES_NO_SUITESPARSE
|
|
-DCERES_NO_CXSPARSE
|
|
-DCERES_NO_PROTOCOL_BUFFERS
|
|
-DCERES_RESTRICT_SCHUR_SPECIALIZATION
|
|
-DCERES_HAVE_RWLOCK
|
|
)
|
|
|
|
if(WITH_OPENMP)
|
|
add_definitions(
|
|
-DCERES_USE_OPENMP
|
|
)
|
|
endif()
|
|
|
|
if(MSVC10)
|
|
add_definitions(
|
|
-D"CERES_HASH_NAMESPACE_START=namespace std {"
|
|
-D"CERES_HASH_NAMESPACE_END=}"
|
|
)
|
|
else()
|
|
add_definitions(
|
|
-D"CERES_HASH_NAMESPACE_START=namespace std { namespace tr1 {"
|
|
-D"CERES_HASH_NAMESPACE_END=}}"
|
|
)
|
|
endif()
|
|
|
|
if(APPLE)
|
|
if(CMAKE_OSX_DEPLOYMENT_TARGET STREQUAL "10.5")
|
|
add_definitions(
|
|
-DCERES_NO_TR1
|
|
)
|
|
endif()
|
|
endif()
|
|
|
|
blender_add_lib(extern_ceres "${SRC}" "${INC}" "${INC_SYS}")
|