Disable fixed-sized specializations for schur solver
[blender.git] / extern / libmv / third_party / ceres / CMakeLists.txt
1 # ***** BEGIN GPL LICENSE BLOCK *****
2 #
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 #
17 # The Original Code is Copyright (C) 2012, Blender Foundation
18 # All rights reserved.
19 #
20 # Contributor(s): Blender Foundation,
21 #                 Sergey Sharybin
22 #
23 # ***** END GPL LICENSE BLOCK *****
24
25 # NOTE: This file is automatically generated by bundle.sh script
26 #       If you're doing changes in this file, please update template
27 #       in that script too
28
29 set(INC
30         .
31         ../../../Eigen3
32         include
33         internal
34         ../gflags
35 )
36
37 set(INC_SYS
38 )
39
40 set(SRC
41         internal/ceres/block_evaluate_preparer.cc
42         internal/ceres/block_jacobian_writer.cc
43         internal/ceres/block_jacobi_preconditioner.cc
44         internal/ceres/block_random_access_dense_matrix.cc
45         internal/ceres/block_random_access_matrix.cc
46         internal/ceres/block_random_access_sparse_matrix.cc
47         internal/ceres/block_sparse_matrix.cc
48         internal/ceres/block_structure.cc
49         internal/ceres/canonical_views_clustering.cc
50         internal/ceres/cgnr_solver.cc
51         internal/ceres/compressed_row_jacobian_writer.cc
52         internal/ceres/compressed_row_sparse_matrix.cc
53         internal/ceres/conditioned_cost_function.cc
54         internal/ceres/conjugate_gradients_solver.cc
55         internal/ceres/corrector.cc
56         internal/ceres/dense_qr_solver.cc
57         internal/ceres/dense_sparse_matrix.cc
58         internal/ceres/detect_structure.cc
59         internal/ceres/evaluator.cc
60         internal/ceres/file.cc
61         internal/ceres/generated/schur_eliminator_d_d_d.cc
62         internal/ceres/gradient_checking_cost_function.cc
63         internal/ceres/implicit_schur_complement.cc
64         internal/ceres/iterative_schur_complement_solver.cc
65         internal/ceres/levenberg_marquardt.cc
66         internal/ceres/linear_least_squares_problems.cc
67         internal/ceres/linear_operator.cc
68         internal/ceres/linear_solver.cc
69         internal/ceres/local_parameterization.cc
70         internal/ceres/loss_function.cc
71         internal/ceres/normal_prior.cc
72         internal/ceres/partitioned_matrix_view.cc
73         internal/ceres/problem.cc
74         internal/ceres/problem_impl.cc
75         internal/ceres/program.cc
76         internal/ceres/residual_block.cc
77         internal/ceres/residual_block_utils.cc
78         internal/ceres/runtime_numeric_diff_cost_function.cc
79         internal/ceres/schur_complement_solver.cc
80         internal/ceres/schur_eliminator.cc
81         internal/ceres/schur_ordering.cc
82         internal/ceres/scratch_evaluate_preparer.cc
83         internal/ceres/solver.cc
84         internal/ceres/solver_impl.cc
85         internal/ceres/sparse_matrix.cc
86         internal/ceres/sparse_normal_cholesky_solver.cc
87         internal/ceres/split.cc
88         internal/ceres/stringprintf.cc
89         internal/ceres/suitesparse.cc
90         internal/ceres/triplet_sparse_matrix.cc
91         internal/ceres/types.cc
92         internal/ceres/visibility_based_preconditioner.cc
93         internal/ceres/visibility.cc
94
95         include/ceres/autodiff_cost_function.h
96         include/ceres/ceres.h
97         include/ceres/conditioned_cost_function.h
98         include/ceres/cost_function.h
99         include/ceres/internal/autodiff.h
100         include/ceres/internal/eigen.h
101         include/ceres/internal/fixed_array.h
102         include/ceres/internal/macros.h
103         include/ceres/internal/manual_constructor.h
104         include/ceres/internal/port.h
105         include/ceres/internal/scoped_ptr.h
106         include/ceres/iteration_callback.h
107         include/ceres/jet.h
108         include/ceres/local_parameterization.h
109         include/ceres/loss_function.h
110         include/ceres/normal_prior.h
111         include/ceres/numeric_diff_cost_function.h
112         include/ceres/problem.h
113         include/ceres/rotation.h
114         include/ceres/sized_cost_function.h
115         include/ceres/solver.h
116         include/ceres/types.h
117         internal/ceres/block_evaluate_preparer.h
118         internal/ceres/block_jacobian_writer.h
119         internal/ceres/block_jacobi_preconditioner.h
120         internal/ceres/block_random_access_dense_matrix.h
121         internal/ceres/block_random_access_matrix.h
122         internal/ceres/block_random_access_sparse_matrix.h
123         internal/ceres/block_sparse_matrix.h
124         internal/ceres/block_structure.h
125         internal/ceres/canonical_views_clustering.h
126         internal/ceres/casts.h
127         internal/ceres/cgnr_linear_operator.h
128         internal/ceres/cgnr_solver.h
129         internal/ceres/collections_port.h
130         internal/ceres/compressed_row_jacobian_writer.h
131         internal/ceres/compressed_row_sparse_matrix.h
132         internal/ceres/conjugate_gradients_solver.h
133         internal/ceres/corrector.h
134         internal/ceres/dense_jacobian_writer.h
135         internal/ceres/dense_qr_solver.h
136         internal/ceres/dense_sparse_matrix.h
137         internal/ceres/detect_structure.h
138         internal/ceres/evaluator.h
139         internal/ceres/file.h
140         internal/ceres/gradient_checking_cost_function.h
141         internal/ceres/graph_algorithms.h
142         internal/ceres/graph.h
143         internal/ceres/implicit_schur_complement.h
144         internal/ceres/integral_types.h
145         internal/ceres/iterative_schur_complement_solver.h
146         internal/ceres/levenberg_marquardt.h
147         internal/ceres/linear_least_squares_problems.h
148         internal/ceres/linear_operator.h
149         internal/ceres/linear_solver.h
150         internal/ceres/map_util.h
151         internal/ceres/matrix_proto.h
152         internal/ceres/minimizer.h
153         internal/ceres/mutex.h
154         internal/ceres/parameter_block.h
155         internal/ceres/partitioned_matrix_view.h
156         internal/ceres/problem_impl.h
157         internal/ceres/program_evaluator.h
158         internal/ceres/program.h
159         internal/ceres/random.h
160         internal/ceres/residual_block.h
161         internal/ceres/residual_block_utils.h
162         internal/ceres/runtime_numeric_diff_cost_function.h
163         internal/ceres/schur_complement_solver.h
164         internal/ceres/schur_eliminator.h
165         internal/ceres/schur_eliminator_impl.h
166         internal/ceres/schur_ordering.h
167         internal/ceres/scratch_evaluate_preparer.h
168         internal/ceres/solver_impl.h
169         internal/ceres/sparse_matrix.h
170         internal/ceres/sparse_normal_cholesky_solver.h
171         internal/ceres/stl_util.h
172         internal/ceres/stringprintf.h
173         internal/ceres/suitesparse.h
174         internal/ceres/triplet_sparse_matrix.h
175         internal/ceres/visibility_based_preconditioner.h
176         internal/ceres/visibility.h
177 )
178
179 #if(FALSE)
180 #       list(APPEND SRC
181 #               internal/ceres/generated/schur_eliminator_2_2_2.cc
182 #               internal/ceres/generated/schur_eliminator_2_2_3.cc
183 #               internal/ceres/generated/schur_eliminator_2_2_4.cc
184 #               internal/ceres/generated/schur_eliminator_2_2_d.cc
185 #               internal/ceres/generated/schur_eliminator_2_3_3.cc
186 #               internal/ceres/generated/schur_eliminator_2_3_4.cc
187 #               internal/ceres/generated/schur_eliminator_2_3_9.cc
188 #               internal/ceres/generated/schur_eliminator_2_3_d.cc
189 #               internal/ceres/generated/schur_eliminator_2_4_3.cc
190 #               internal/ceres/generated/schur_eliminator_2_4_4.cc
191 #               internal/ceres/generated/schur_eliminator_2_4_d.cc
192 #               internal/ceres/generated/schur_eliminator_4_4_2.cc
193 #               internal/ceres/generated/schur_eliminator_4_4_3.cc
194 #               internal/ceres/generated/schur_eliminator_4_4_4.cc
195 #               internal/ceres/generated/schur_eliminator_4_4_d.cc
196 #       )
197 #endif()
198
199 if(WIN32)
200         list(APPEND INC
201                 ../glog/src/windows
202         )
203
204         if(NOT MINGW)
205                 list(APPEND INC
206                         third_party/msinttypes
207                 )
208         endif()
209 else()
210         list(APPEND INC
211                 ../glog/src
212         )
213 endif()
214
215 add_definitions(
216         -DCERES_HAVE_PTHREAD
217         -D"CERES_HASH_NAMESPACE_START=namespace std { namespace tr1 {"
218         -D"CERES_HASH_NAMESPACE_END=}}"
219         -DCERES_NO_SUITESPARSE
220         -DCERES_DONT_HAVE_PROTOCOL_BUFFERS
221         -DCERES_RESTRICT_SCHUR_SPECIALIZATION
222 )
223
224 blender_add_lib(extern_ceres "${SRC}" "${INC}" "${INC_SYS}")