Fix windows MSVC build.

This CL improves the build experience with MSVC:
- It adds the build flag '/bigobj' otherwise the build of
  the unit test fails.
- It adds the flag '/wd4267' to suppress signed / unsigned int
  conversions (size_t to int).
- It removes the use of std::aligned_storage from FixedArray.
  This has been done from the Abseil Team and is in the
  absl::FixedArray. Those changes has been ported to ceres.
  This fixes the alignemnt for older MSVC versions due to a
  bug in the implementation of std::aligned_storage, and
  prevents the use of the macro '_ENABLE_EXTENDED_ALIGNED_STORAGE'
  for newer MSVC versions, which is problematic as it could affect
  user code.
- Fix of the fixed array unit test. Due to the use of std::tuple
  instead of absl::tuple in ceres::internal::FixedArray, the
  unit test needs to reflect that change as well.
- Replaces 'add_definitions' with 'add_compile_options' for
  compiler flags as suggested by the cmake documentation.

Change-Id: I63f08cd6c0a8db8c9931289b909b4deafd75b039
3 files changed
tree: 72f27bde0f9d7994e9afdecd44b99cd8f181c064
  1. bazel/
  2. cmake/
  3. config/
  4. data/
  5. docs/
  6. examples/
  7. include/
  8. internal/
  9. scripts/
  10. travis/
  11. .clang-format
  12. .gitignore
  13. .travis.yml
  14. BUILD
  15. CMakeLists.txt
  16. CONTRIBUTING.md
  17. LICENSE
  18. package.xml
  19. README.md
  20. WORKSPACE
README.md

Build Status

Ceres Solver

Ceres Solver is an open source C++ library for modeling and solving large, complicated optimization problems. It is a feature rich, mature and performant library which has been used in production at Google since 2010. Ceres Solver can solve two kinds of problems.

  1. Non-linear Least Squares problems with bounds constraints.
  2. General unconstrained optimization problems.

Please see ceres-solver.org for more information.