CMakeLists.txt 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  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. # NOTE: This file is automatically generated by bundle.sh script
  25. # If you're doing changes in this file, please update template
  26. # in that script too
  27. set(INC
  28. .
  29. include
  30. internal
  31. config
  32. ../gflags/src
  33. )
  34. set(INC_SYS
  35. ${EIGEN3_INCLUDE_DIRS}
  36. )
  37. set(SRC
  38. internal/ceres/array_utils.cc
  39. internal/ceres/blas.cc
  40. internal/ceres/block_evaluate_preparer.cc
  41. internal/ceres/block_jacobian_writer.cc
  42. internal/ceres/block_jacobi_preconditioner.cc
  43. internal/ceres/block_random_access_dense_matrix.cc
  44. internal/ceres/block_random_access_diagonal_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/callbacks.cc
  50. internal/ceres/c_api.cc
  51. internal/ceres/cgnr_solver.cc
  52. internal/ceres/compressed_col_sparse_matrix_utils.cc
  53. internal/ceres/compressed_row_jacobian_writer.cc
  54. internal/ceres/compressed_row_sparse_matrix.cc
  55. internal/ceres/conditioned_cost_function.cc
  56. internal/ceres/conjugate_gradients_solver.cc
  57. internal/ceres/coordinate_descent_minimizer.cc
  58. internal/ceres/corrector.cc
  59. internal/ceres/covariance.cc
  60. internal/ceres/covariance_impl.cc
  61. internal/ceres/dense_normal_cholesky_solver.cc
  62. internal/ceres/dense_qr_solver.cc
  63. internal/ceres/dense_sparse_matrix.cc
  64. internal/ceres/detect_structure.cc
  65. internal/ceres/dogleg_strategy.cc
  66. internal/ceres/dynamic_compressed_row_jacobian_writer.cc
  67. internal/ceres/dynamic_compressed_row_sparse_matrix.cc
  68. internal/ceres/evaluator.cc
  69. internal/ceres/file.cc
  70. internal/ceres/generated/partitioned_matrix_view_d_d_d.cc
  71. internal/ceres/generated/schur_eliminator_d_d_d.cc
  72. internal/ceres/gradient_checker.cc
  73. internal/ceres/gradient_checking_cost_function.cc
  74. internal/ceres/gradient_problem.cc
  75. internal/ceres/gradient_problem_solver.cc
  76. internal/ceres/implicit_schur_complement.cc
  77. internal/ceres/is_close.cc
  78. internal/ceres/iterative_schur_complement_solver.cc
  79. internal/ceres/lapack.cc
  80. internal/ceres/levenberg_marquardt_strategy.cc
  81. internal/ceres/linear_least_squares_problems.cc
  82. internal/ceres/linear_operator.cc
  83. internal/ceres/linear_solver.cc
  84. internal/ceres/line_search.cc
  85. internal/ceres/line_search_direction.cc
  86. internal/ceres/line_search_minimizer.cc
  87. internal/ceres/line_search_preprocessor.cc
  88. internal/ceres/local_parameterization.cc
  89. internal/ceres/loss_function.cc
  90. internal/ceres/low_rank_inverse_hessian.cc
  91. internal/ceres/minimizer.cc
  92. internal/ceres/normal_prior.cc
  93. internal/ceres/parameter_block_ordering.cc
  94. internal/ceres/partitioned_matrix_view.cc
  95. internal/ceres/polynomial.cc
  96. internal/ceres/preconditioner.cc
  97. internal/ceres/preprocessor.cc
  98. internal/ceres/problem.cc
  99. internal/ceres/problem_impl.cc
  100. internal/ceres/program.cc
  101. internal/ceres/reorder_program.cc
  102. internal/ceres/residual_block.cc
  103. internal/ceres/residual_block_utils.cc
  104. internal/ceres/schur_complement_solver.cc
  105. internal/ceres/schur_eliminator.cc
  106. internal/ceres/schur_jacobi_preconditioner.cc
  107. internal/ceres/scratch_evaluate_preparer.cc
  108. internal/ceres/solver.cc
  109. internal/ceres/solver_utils.cc
  110. internal/ceres/sparse_matrix.cc
  111. internal/ceres/sparse_normal_cholesky_solver.cc
  112. internal/ceres/split.cc
  113. internal/ceres/stringprintf.cc
  114. internal/ceres/triplet_sparse_matrix.cc
  115. internal/ceres/trust_region_minimizer.cc
  116. internal/ceres/trust_region_preprocessor.cc
  117. internal/ceres/trust_region_step_evaluator.cc
  118. internal/ceres/trust_region_strategy.cc
  119. internal/ceres/types.cc
  120. internal/ceres/wall_time.cc
  121. include/ceres/autodiff_cost_function.h
  122. include/ceres/autodiff_local_parameterization.h
  123. include/ceres/c_api.h
  124. include/ceres/ceres.h
  125. include/ceres/conditioned_cost_function.h
  126. include/ceres/cost_function.h
  127. include/ceres/cost_function_to_functor.h
  128. include/ceres/covariance.h
  129. include/ceres/crs_matrix.h
  130. include/ceres/dynamic_autodiff_cost_function.h
  131. include/ceres/dynamic_cost_function_to_functor.h
  132. include/ceres/dynamic_numeric_diff_cost_function.h
  133. include/ceres/fpclassify.h
  134. include/ceres/gradient_checker.h
  135. include/ceres/gradient_problem.h
  136. include/ceres/gradient_problem_solver.h
  137. include/ceres/internal/autodiff.h
  138. include/ceres/internal/disable_warnings.h
  139. include/ceres/internal/eigen.h
  140. include/ceres/internal/fixed_array.h
  141. include/ceres/internal/macros.h
  142. include/ceres/internal/manual_constructor.h
  143. include/ceres/internal/numeric_diff.h
  144. include/ceres/internal/port.h
  145. include/ceres/internal/reenable_warnings.h
  146. include/ceres/internal/scoped_ptr.h
  147. include/ceres/internal/variadic_evaluate.h
  148. include/ceres/iteration_callback.h
  149. include/ceres/jet.h
  150. include/ceres/local_parameterization.h
  151. include/ceres/loss_function.h
  152. include/ceres/normal_prior.h
  153. include/ceres/numeric_diff_cost_function.h
  154. include/ceres/numeric_diff_options.h
  155. include/ceres/ordered_groups.h
  156. include/ceres/problem.h
  157. include/ceres/rotation.h
  158. include/ceres/sized_cost_function.h
  159. include/ceres/solver.h
  160. include/ceres/types.h
  161. include/ceres/version.h
  162. internal/ceres/array_utils.h
  163. internal/ceres/blas.h
  164. internal/ceres/block_evaluate_preparer.h
  165. internal/ceres/block_jacobian_writer.h
  166. internal/ceres/block_jacobi_preconditioner.h
  167. internal/ceres/block_random_access_dense_matrix.h
  168. internal/ceres/block_random_access_diagonal_matrix.h
  169. internal/ceres/block_random_access_matrix.h
  170. internal/ceres/block_random_access_sparse_matrix.h
  171. internal/ceres/block_sparse_matrix.h
  172. internal/ceres/block_structure.h
  173. internal/ceres/callbacks.h
  174. internal/ceres/casts.h
  175. internal/ceres/cgnr_linear_operator.h
  176. internal/ceres/cgnr_solver.h
  177. internal/ceres/collections_port.h
  178. internal/ceres/compressed_col_sparse_matrix_utils.h
  179. internal/ceres/compressed_row_jacobian_writer.h
  180. internal/ceres/compressed_row_sparse_matrix.h
  181. internal/ceres/conjugate_gradients_solver.h
  182. internal/ceres/coordinate_descent_minimizer.h
  183. internal/ceres/corrector.h
  184. internal/ceres/covariance_impl.h
  185. internal/ceres/cxsparse.h
  186. internal/ceres/dense_jacobian_writer.h
  187. internal/ceres/dense_normal_cholesky_solver.h
  188. internal/ceres/dense_qr_solver.h
  189. internal/ceres/dense_sparse_matrix.h
  190. internal/ceres/detect_structure.h
  191. internal/ceres/dogleg_strategy.h
  192. internal/ceres/dynamic_compressed_row_finalizer.h
  193. internal/ceres/dynamic_compressed_row_jacobian_writer.h
  194. internal/ceres/dynamic_compressed_row_sparse_matrix.h
  195. internal/ceres/evaluator.h
  196. internal/ceres/execution_summary.h
  197. internal/ceres/file.h
  198. internal/ceres/gradient_checking_cost_function.h
  199. internal/ceres/gradient_problem_evaluator.h
  200. internal/ceres/graph_algorithms.h
  201. internal/ceres/graph.h
  202. internal/ceres/householder_vector.h
  203. internal/ceres/implicit_schur_complement.h
  204. internal/ceres/integral_types.h
  205. internal/ceres/is_close.h
  206. internal/ceres/iterative_schur_complement_solver.h
  207. internal/ceres/lapack.h
  208. internal/ceres/levenberg_marquardt_strategy.h
  209. internal/ceres/linear_least_squares_problems.h
  210. internal/ceres/linear_operator.h
  211. internal/ceres/linear_solver.h
  212. internal/ceres/line_search_direction.h
  213. internal/ceres/line_search.h
  214. internal/ceres/line_search_minimizer.h
  215. internal/ceres/line_search_preprocessor.h
  216. internal/ceres/low_rank_inverse_hessian.h
  217. internal/ceres/map_util.h
  218. internal/ceres/minimizer.h
  219. internal/ceres/mutex.h
  220. internal/ceres/parameter_block.h
  221. internal/ceres/parameter_block_ordering.h
  222. internal/ceres/partitioned_matrix_view.h
  223. internal/ceres/partitioned_matrix_view_impl.h
  224. internal/ceres/polynomial.h
  225. internal/ceres/preconditioner.h
  226. internal/ceres/preprocessor.h
  227. internal/ceres/problem_impl.h
  228. internal/ceres/program_evaluator.h
  229. internal/ceres/program.h
  230. internal/ceres/random.h
  231. internal/ceres/reorder_program.h
  232. internal/ceres/residual_block.h
  233. internal/ceres/residual_block_utils.h
  234. internal/ceres/schur_complement_solver.h
  235. internal/ceres/schur_eliminator.h
  236. internal/ceres/schur_eliminator_impl.h
  237. internal/ceres/schur_jacobi_preconditioner.h
  238. internal/ceres/scratch_evaluate_preparer.h
  239. internal/ceres/small_blas.h
  240. internal/ceres/solver_utils.h
  241. internal/ceres/sparse_matrix.h
  242. internal/ceres/sparse_normal_cholesky_solver.h
  243. internal/ceres/split.h
  244. internal/ceres/stl_util.h
  245. internal/ceres/stringprintf.h
  246. internal/ceres/suitesparse.h
  247. internal/ceres/triplet_sparse_matrix.h
  248. internal/ceres/trust_region_minimizer.h
  249. internal/ceres/trust_region_preprocessor.h
  250. internal/ceres/trust_region_step_evaluator.h
  251. internal/ceres/trust_region_strategy.h
  252. internal/ceres/visibility_based_preconditioner.h
  253. internal/ceres/wall_time.h
  254. )
  255. if(WITH_LIBMV_SCHUR_SPECIALIZATIONS)
  256. list(APPEND SRC
  257. internal/ceres/generated/partitioned_matrix_view_2_2_2.cc
  258. internal/ceres/generated/partitioned_matrix_view_2_2_3.cc
  259. internal/ceres/generated/partitioned_matrix_view_2_2_4.cc
  260. internal/ceres/generated/partitioned_matrix_view_2_2_d.cc
  261. internal/ceres/generated/partitioned_matrix_view_2_3_3.cc
  262. internal/ceres/generated/partitioned_matrix_view_2_3_4.cc
  263. internal/ceres/generated/partitioned_matrix_view_2_3_6.cc
  264. internal/ceres/generated/partitioned_matrix_view_2_3_9.cc
  265. internal/ceres/generated/partitioned_matrix_view_2_3_d.cc
  266. internal/ceres/generated/partitioned_matrix_view_2_4_3.cc
  267. internal/ceres/generated/partitioned_matrix_view_2_4_4.cc
  268. internal/ceres/generated/partitioned_matrix_view_2_4_8.cc
  269. internal/ceres/generated/partitioned_matrix_view_2_4_9.cc
  270. internal/ceres/generated/partitioned_matrix_view_2_4_d.cc
  271. internal/ceres/generated/partitioned_matrix_view_2_d_d.cc
  272. internal/ceres/generated/partitioned_matrix_view_4_4_2.cc
  273. internal/ceres/generated/partitioned_matrix_view_4_4_3.cc
  274. internal/ceres/generated/partitioned_matrix_view_4_4_4.cc
  275. internal/ceres/generated/partitioned_matrix_view_4_4_d.cc
  276. internal/ceres/generated/schur_eliminator_2_2_2.cc
  277. internal/ceres/generated/schur_eliminator_2_2_3.cc
  278. internal/ceres/generated/schur_eliminator_2_2_4.cc
  279. internal/ceres/generated/schur_eliminator_2_2_d.cc
  280. internal/ceres/generated/schur_eliminator_2_3_3.cc
  281. internal/ceres/generated/schur_eliminator_2_3_4.cc
  282. internal/ceres/generated/schur_eliminator_2_3_6.cc
  283. internal/ceres/generated/schur_eliminator_2_3_9.cc
  284. internal/ceres/generated/schur_eliminator_2_3_d.cc
  285. internal/ceres/generated/schur_eliminator_2_4_3.cc
  286. internal/ceres/generated/schur_eliminator_2_4_4.cc
  287. internal/ceres/generated/schur_eliminator_2_4_8.cc
  288. internal/ceres/generated/schur_eliminator_2_4_9.cc
  289. internal/ceres/generated/schur_eliminator_2_4_d.cc
  290. internal/ceres/generated/schur_eliminator_2_d_d.cc
  291. internal/ceres/generated/schur_eliminator_4_4_2.cc
  292. internal/ceres/generated/schur_eliminator_4_4_3.cc
  293. internal/ceres/generated/schur_eliminator_4_4_4.cc
  294. internal/ceres/generated/schur_eliminator_4_4_d.cc
  295. )
  296. else()
  297. add_definitions(-DCERES_RESTRICT_SCHUR_SPECIALIZATION)
  298. endif()
  299. if(WIN32)
  300. list(APPEND INC
  301. ../glog/src/windows
  302. )
  303. else()
  304. list(APPEND INC
  305. ../glog/src
  306. )
  307. endif()
  308. add_definitions(${GFLAGS_DEFINES})
  309. add_definitions(${GLOG_DEFINES})
  310. add_definitions(${CERES_DEFINES})
  311. add_definitions(
  312. -DCERES_HAVE_PTHREAD
  313. -DCERES_NO_SUITESPARSE
  314. -DCERES_NO_CXSPARSE
  315. -DCERES_NO_LAPACK
  316. -DCERES_HAVE_RWLOCK
  317. )
  318. if(WITH_OPENMP)
  319. add_definitions(
  320. -DCERES_USE_OPENMP
  321. )
  322. endif()
  323. blender_add_lib(extern_ceres "${SRC}" "${INC}" "${INC_SYS}")