2012-06-10 15:27:41 +00:00
|
|
|
# ***** 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
|
2013-02-18 11:50:03 +00:00
|
|
|
../../
|
2012-06-10 15:27:41 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set(INC_SYS
|
2012-10-14 08:49:01 +00:00
|
|
|
../../../Eigen3
|
2012-06-10 15:27:41 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set(SRC
|
2012-09-16 12:24:37 +00:00
|
|
|
internal/ceres/array_utils.cc
|
2013-09-05 10:48:44 +00:00
|
|
|
internal/ceres/blas.cc
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/block_evaluate_preparer.cc
|
|
|
|
internal/ceres/block_jacobian_writer.cc
|
|
|
|
internal/ceres/block_jacobi_preconditioner.cc
|
2013-09-05 10:48:44 +00:00
|
|
|
internal/ceres/block_random_access_crs_matrix.cc
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/block_random_access_dense_matrix.cc
|
2013-11-28 13:06:35 +00:00
|
|
|
internal/ceres/block_random_access_diagonal_matrix.cc
|
2012-06-10 15:27:41 +00:00
|
|
|
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
|
2013-09-05 10:48:44 +00:00
|
|
|
internal/ceres/c_api.cc
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/cgnr_solver.cc
|
2013-09-05 10:48:44 +00:00
|
|
|
internal/ceres/compressed_col_sparse_matrix_utils.cc
|
2012-06-10 15:27:41 +00:00
|
|
|
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
|
2013-02-25 08:59:26 +00:00
|
|
|
internal/ceres/coordinate_descent_minimizer.cc
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/corrector.cc
|
2013-09-05 10:48:44 +00:00
|
|
|
internal/ceres/covariance.cc
|
|
|
|
internal/ceres/covariance_impl.cc
|
2012-09-16 12:24:37 +00:00
|
|
|
internal/ceres/cxsparse.cc
|
|
|
|
internal/ceres/dense_normal_cholesky_solver.cc
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/dense_qr_solver.cc
|
|
|
|
internal/ceres/dense_sparse_matrix.cc
|
|
|
|
internal/ceres/detect_structure.cc
|
2012-09-16 12:24:37 +00:00
|
|
|
internal/ceres/dogleg_strategy.cc
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/evaluator.cc
|
|
|
|
internal/ceres/file.cc
|
2013-11-28 13:06:35 +00:00
|
|
|
internal/ceres/generated/partitioned_matrix_view_d_d_d.cc
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/generated/schur_eliminator_d_d_d.cc
|
|
|
|
internal/ceres/gradient_checking_cost_function.cc
|
|
|
|
internal/ceres/implicit_schur_complement.cc
|
2013-09-05 10:48:44 +00:00
|
|
|
internal/ceres/incomplete_lq_factorization.cc
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/iterative_schur_complement_solver.cc
|
2013-09-05 10:48:44 +00:00
|
|
|
internal/ceres/lapack.cc
|
2012-09-16 12:24:37 +00:00
|
|
|
internal/ceres/levenberg_marquardt_strategy.cc
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/linear_least_squares_problems.cc
|
|
|
|
internal/ceres/linear_operator.cc
|
|
|
|
internal/ceres/linear_solver.cc
|
2013-02-25 08:59:26 +00:00
|
|
|
internal/ceres/line_search.cc
|
|
|
|
internal/ceres/line_search_direction.cc
|
|
|
|
internal/ceres/line_search_minimizer.cc
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/local_parameterization.cc
|
|
|
|
internal/ceres/loss_function.cc
|
2013-02-25 08:59:26 +00:00
|
|
|
internal/ceres/low_rank_inverse_hessian.cc
|
|
|
|
internal/ceres/minimizer.cc
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/normal_prior.cc
|
2013-02-25 08:59:26 +00:00
|
|
|
internal/ceres/parameter_block_ordering.cc
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/partitioned_matrix_view.cc
|
2013-02-25 08:59:26 +00:00
|
|
|
internal/ceres/polynomial.cc
|
|
|
|
internal/ceres/preconditioner.cc
|
2012-06-10 15:27:41 +00:00
|
|
|
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/schur_complement_solver.cc
|
|
|
|
internal/ceres/schur_eliminator.cc
|
2013-02-25 08:59:26 +00:00
|
|
|
internal/ceres/schur_jacobi_preconditioner.cc
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/scratch_evaluate_preparer.cc
|
2013-11-28 13:06:35 +00:00
|
|
|
internal/ceres/single_linkage_clustering.cc
|
2012-06-10 15:27:41 +00:00
|
|
|
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
|
2012-09-16 12:24:37 +00:00
|
|
|
internal/ceres/trust_region_minimizer.cc
|
|
|
|
internal/ceres/trust_region_strategy.cc
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/types.cc
|
|
|
|
internal/ceres/visibility_based_preconditioner.cc
|
|
|
|
internal/ceres/visibility.cc
|
2013-02-25 08:59:26 +00:00
|
|
|
internal/ceres/wall_time.cc
|
2012-06-10 15:27:41 +00:00
|
|
|
|
|
|
|
include/ceres/autodiff_cost_function.h
|
2013-04-22 09:25:37 +00:00
|
|
|
include/ceres/autodiff_local_parameterization.h
|
2013-09-05 10:48:44 +00:00
|
|
|
include/ceres/c_api.h
|
2012-06-10 15:27:41 +00:00
|
|
|
include/ceres/ceres.h
|
|
|
|
include/ceres/conditioned_cost_function.h
|
|
|
|
include/ceres/cost_function.h
|
2013-02-25 08:59:26 +00:00
|
|
|
include/ceres/cost_function_to_functor.h
|
2013-09-05 10:48:44 +00:00
|
|
|
include/ceres/covariance.h
|
2012-09-16 12:24:37 +00:00
|
|
|
include/ceres/crs_matrix.h
|
2013-02-25 08:59:26 +00:00
|
|
|
include/ceres/dynamic_autodiff_cost_function.h
|
2013-11-28 13:06:35 +00:00
|
|
|
include/ceres/dynamic_numeric_diff_cost_function.h
|
2012-09-16 12:24:37 +00:00
|
|
|
include/ceres/fpclassify.h
|
2013-02-25 08:59:26 +00:00
|
|
|
include/ceres/gradient_checker.h
|
2012-06-10 15:27:41 +00:00
|
|
|
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
|
2013-02-25 08:59:26 +00:00
|
|
|
include/ceres/internal/numeric_diff.h
|
2012-06-10 15:27:41 +00:00
|
|
|
include/ceres/internal/port.h
|
|
|
|
include/ceres/internal/scoped_ptr.h
|
2013-02-25 08:59:26 +00:00
|
|
|
include/ceres/internal/variadic_evaluate.h
|
2012-06-10 15:27:41 +00:00
|
|
|
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
|
2013-02-25 08:59:26 +00:00
|
|
|
include/ceres/numeric_diff_functor.h
|
|
|
|
include/ceres/ordered_groups.h
|
2012-06-10 15:27:41 +00:00
|
|
|
include/ceres/problem.h
|
|
|
|
include/ceres/rotation.h
|
|
|
|
include/ceres/sized_cost_function.h
|
|
|
|
include/ceres/solver.h
|
|
|
|
include/ceres/types.h
|
2012-09-16 12:24:37 +00:00
|
|
|
internal/ceres/array_utils.h
|
2013-04-05 09:22:54 +00:00
|
|
|
internal/ceres/blas.h
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/block_evaluate_preparer.h
|
|
|
|
internal/ceres/block_jacobian_writer.h
|
|
|
|
internal/ceres/block_jacobi_preconditioner.h
|
2013-09-05 10:48:44 +00:00
|
|
|
internal/ceres/block_random_access_crs_matrix.h
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/block_random_access_dense_matrix.h
|
2013-11-28 13:06:35 +00:00
|
|
|
internal/ceres/block_random_access_diagonal_matrix.h
|
2012-06-10 15:27:41 +00:00
|
|
|
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
|
2013-09-05 10:48:44 +00:00
|
|
|
internal/ceres/compressed_col_sparse_matrix_utils.h
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/compressed_row_jacobian_writer.h
|
|
|
|
internal/ceres/compressed_row_sparse_matrix.h
|
|
|
|
internal/ceres/conjugate_gradients_solver.h
|
2013-02-25 08:59:26 +00:00
|
|
|
internal/ceres/coordinate_descent_minimizer.h
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/corrector.h
|
2013-09-05 10:48:44 +00:00
|
|
|
internal/ceres/covariance_impl.h
|
2012-09-16 12:24:37 +00:00
|
|
|
internal/ceres/cxsparse.h
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/dense_jacobian_writer.h
|
2012-09-16 12:24:37 +00:00
|
|
|
internal/ceres/dense_normal_cholesky_solver.h
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/dense_qr_solver.h
|
|
|
|
internal/ceres/dense_sparse_matrix.h
|
|
|
|
internal/ceres/detect_structure.h
|
2012-09-16 12:24:37 +00:00
|
|
|
internal/ceres/dogleg_strategy.h
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/evaluator.h
|
2013-02-25 08:59:26 +00:00
|
|
|
internal/ceres/execution_summary.h
|
2012-06-10 15:27:41 +00:00
|
|
|
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
|
2013-09-05 10:48:44 +00:00
|
|
|
internal/ceres/incomplete_lq_factorization.h
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/integral_types.h
|
|
|
|
internal/ceres/iterative_schur_complement_solver.h
|
2013-09-05 10:48:44 +00:00
|
|
|
internal/ceres/lapack.h
|
2012-09-16 12:24:37 +00:00
|
|
|
internal/ceres/levenberg_marquardt_strategy.h
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/linear_least_squares_problems.h
|
|
|
|
internal/ceres/linear_operator.h
|
|
|
|
internal/ceres/linear_solver.h
|
2013-02-25 08:59:26 +00:00
|
|
|
internal/ceres/line_search_direction.h
|
|
|
|
internal/ceres/line_search.h
|
|
|
|
internal/ceres/line_search_minimizer.h
|
|
|
|
internal/ceres/low_rank_inverse_hessian.h
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/map_util.h
|
|
|
|
internal/ceres/minimizer.h
|
|
|
|
internal/ceres/mutex.h
|
|
|
|
internal/ceres/parameter_block.h
|
2013-02-25 08:59:26 +00:00
|
|
|
internal/ceres/parameter_block_ordering.h
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/partitioned_matrix_view.h
|
2013-11-28 13:06:35 +00:00
|
|
|
internal/ceres/partitioned_matrix_view_impl.h
|
2013-02-25 08:59:26 +00:00
|
|
|
internal/ceres/polynomial.h
|
|
|
|
internal/ceres/preconditioner.h
|
2012-06-10 15:27:41 +00:00
|
|
|
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/schur_complement_solver.h
|
|
|
|
internal/ceres/schur_eliminator.h
|
|
|
|
internal/ceres/schur_eliminator_impl.h
|
2013-02-25 08:59:26 +00:00
|
|
|
internal/ceres/schur_jacobi_preconditioner.h
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/scratch_evaluate_preparer.h
|
2013-11-28 13:06:35 +00:00
|
|
|
internal/ceres/single_linkage_clustering.h
|
2013-09-05 10:48:44 +00:00
|
|
|
internal/ceres/small_blas.h
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/solver_impl.h
|
|
|
|
internal/ceres/sparse_matrix.h
|
|
|
|
internal/ceres/sparse_normal_cholesky_solver.h
|
2012-09-16 12:24:37 +00:00
|
|
|
internal/ceres/split.h
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/stl_util.h
|
|
|
|
internal/ceres/stringprintf.h
|
|
|
|
internal/ceres/suitesparse.h
|
|
|
|
internal/ceres/triplet_sparse_matrix.h
|
2012-09-16 12:24:37 +00:00
|
|
|
internal/ceres/trust_region_minimizer.h
|
|
|
|
internal/ceres/trust_region_strategy.h
|
2012-06-10 15:27:41 +00:00
|
|
|
internal/ceres/visibility_based_preconditioner.h
|
|
|
|
internal/ceres/visibility.h
|
2013-02-25 08:59:26 +00:00
|
|
|
internal/ceres/wall_time.h
|
2012-06-10 15:27:41 +00:00
|
|
|
)
|
|
|
|
|
2012-06-14 13:33:37 +00:00
|
|
|
#if(FALSE)
|
|
|
|
# list(APPEND SRC
|
2013-11-28 13:06:35 +00:00
|
|
|
# internal/ceres/generated/partitioned_matrix_view_2_2_2.cc
|
|
|
|
# internal/ceres/generated/partitioned_matrix_view_2_2_3.cc
|
|
|
|
# internal/ceres/generated/partitioned_matrix_view_2_2_4.cc
|
|
|
|
# internal/ceres/generated/partitioned_matrix_view_2_2_d.cc
|
|
|
|
# internal/ceres/generated/partitioned_matrix_view_2_3_3.cc
|
|
|
|
# internal/ceres/generated/partitioned_matrix_view_2_3_4.cc
|
|
|
|
# internal/ceres/generated/partitioned_matrix_view_2_3_9.cc
|
|
|
|
# internal/ceres/generated/partitioned_matrix_view_2_3_d.cc
|
|
|
|
# internal/ceres/generated/partitioned_matrix_view_2_4_3.cc
|
|
|
|
# internal/ceres/generated/partitioned_matrix_view_2_4_4.cc
|
|
|
|
# internal/ceres/generated/partitioned_matrix_view_2_4_d.cc
|
|
|
|
# internal/ceres/generated/partitioned_matrix_view_2_d_d.cc
|
|
|
|
# internal/ceres/generated/partitioned_matrix_view_4_4_2.cc
|
|
|
|
# internal/ceres/generated/partitioned_matrix_view_4_4_3.cc
|
|
|
|
# internal/ceres/generated/partitioned_matrix_view_4_4_4.cc
|
|
|
|
# internal/ceres/generated/partitioned_matrix_view_4_4_d.cc
|
2012-06-14 13:33:37 +00:00
|
|
|
# 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
|
2013-11-28 13:06:35 +00:00
|
|
|
# internal/ceres/generated/schur_eliminator_2_d_d.cc
|
2012-06-14 13:33:37 +00:00
|
|
|
# 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()
|
|
|
|
|
2012-06-10 15:27:41 +00:00
|
|
|
if(WIN32)
|
|
|
|
list(APPEND INC
|
|
|
|
../glog/src/windows
|
|
|
|
)
|
|
|
|
|
|
|
|
if(NOT MINGW)
|
|
|
|
list(APPEND INC
|
2012-09-17 04:08:36 +00:00
|
|
|
../msinttypes
|
2012-06-10 15:27:41 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
list(APPEND INC
|
|
|
|
../glog/src
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_definitions(
|
|
|
|
-DCERES_HAVE_PTHREAD
|
|
|
|
-DCERES_NO_SUITESPARSE
|
2012-09-16 12:24:37 +00:00
|
|
|
-DCERES_NO_CXSPARSE
|
2013-09-05 10:48:44 +00:00
|
|
|
-DCERES_NO_LAPACK
|
2012-06-14 13:33:37 +00:00
|
|
|
-DCERES_RESTRICT_SCHUR_SPECIALIZATION
|
2013-02-26 17:52:10 +00:00
|
|
|
-DCERES_HAVE_RWLOCK
|
2012-06-10 15:27:41 +00:00
|
|
|
)
|
|
|
|
|
2013-02-26 17:52:10 +00:00
|
|
|
if(WITH_OPENMP)
|
|
|
|
add_definitions(
|
|
|
|
-DCERES_USE_OPENMP
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2013-11-28 13:06:35 +00:00
|
|
|
include(CheckIncludeFileCXX)
|
2013-11-28 17:24:55 +00:00
|
|
|
CHECK_INCLUDE_FILE_CXX(unordered_map HAVE_STD_UNORDERED_MAP_HEADER)
|
|
|
|
if(HAVE_STD_UNORDERED_MAP_HEADER)
|
2013-11-28 19:46:08 +00:00
|
|
|
# Even so we've found unordered_map header file it doesn't
|
|
|
|
# mean unordered_map and unordered_set will be declared in
|
|
|
|
# std namespace.
|
|
|
|
#
|
|
|
|
# Namely, MSVC 2008 have unordered_map header which declares
|
|
|
|
# unordered_map class in std::tr1 namespace. In order to support
|
|
|
|
# this, we do extra check to see which exactly namespace is
|
|
|
|
# to be used.
|
|
|
|
|
|
|
|
include(CheckCXXSourceCompiles)
|
2013-11-28 17:24:55 +00:00
|
|
|
CHECK_CXX_SOURCE_COMPILES("#include <unordered_map>
|
|
|
|
int main() {
|
|
|
|
std::unordered_map<int, int> map;
|
|
|
|
return 0;
|
|
|
|
}"
|
|
|
|
HAVE_UNURDERED_MAP_IN_STD_NAMESPACE)
|
|
|
|
if(HAVE_UNURDERED_MAP_IN_STD_NAMESPACE)
|
2013-12-10 02:18:46 +00:00
|
|
|
add_definitions(-DCERES_STD_UNORDERED_MAP)
|
|
|
|
message(STATUS "Found unordered_map/set in std namespace.")
|
2013-11-28 17:24:55 +00:00
|
|
|
else()
|
|
|
|
CHECK_CXX_SOURCE_COMPILES("#include <unordered_map>
|
|
|
|
int main() {
|
|
|
|
std::tr1::unordered_map<int, int> map;
|
|
|
|
return 0;
|
|
|
|
}"
|
|
|
|
HAVE_UNURDERED_MAP_IN_TR1_NAMESPACE)
|
|
|
|
if(HAVE_UNURDERED_MAP_IN_TR1_NAMESPACE)
|
2013-12-10 02:18:46 +00:00
|
|
|
add_definitions(-DCERES_STD_UNORDERED_MAP_IN_TR1_NAMESPACE)
|
|
|
|
message(STATUS "Found unordered_map/set in std::tr1 namespace.")
|
2013-11-28 17:24:55 +00:00
|
|
|
else()
|
2013-12-10 02:18:46 +00:00
|
|
|
message(STATUS "Found <unordered_map> but cannot find either std::unordered_map "
|
2013-11-28 19:46:08 +00:00
|
|
|
"or std::tr1::unordered_map.")
|
2013-12-10 02:18:46 +00:00
|
|
|
message(STATUS "Replacing unordered_map/set with map/set (warning: slower!)")
|
|
|
|
add_definitions(-DCERES_NO_UNORDERED_MAP)
|
2013-11-28 17:24:55 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
2012-09-16 12:24:54 +00:00
|
|
|
else()
|
2013-11-28 13:06:35 +00:00
|
|
|
CHECK_INCLUDE_FILE_CXX("tr1/unordered_map" UNORDERED_MAP_IN_TR1_NAMESPACE)
|
|
|
|
if(UNORDERED_MAP_IN_TR1_NAMESPACE)
|
2013-12-10 02:18:46 +00:00
|
|
|
add_definitions(-DCERES_TR1_UNORDERED_MAP)
|
|
|
|
message(STATUS "Found unordered_map/set in std::tr1 namespace.")
|
2013-11-28 13:06:35 +00:00
|
|
|
else()
|
2013-12-10 02:18:46 +00:00
|
|
|
message(STATUS "Unable to find <unordered_map> or <tr1/unordered_map>. ")
|
|
|
|
message(STATUS "Replacing unordered_map/set with map/set (warning: slower!)")
|
|
|
|
add_definitions(-DCERES_NO_UNORDERED_MAP)
|
2012-09-16 12:24:37 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2014-02-18 17:02:53 +00:00
|
|
|
unset(HAVE_UNURDERED_MAP_IN_TR1_NAMESPACE)
|
|
|
|
unset(HAVE_STD_UNORDERED_MAP_HEADER)
|
|
|
|
|
2012-06-10 15:27:41 +00:00
|
|
|
blender_add_lib(extern_ceres "${SRC}" "${INC}" "${INC_SYS}")
|