mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
f26f954105
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