Permalink
Browse files

Fix a MSVC binary-breaking compatibility in MSVC 2017 15.8:

  • Loading branch information...
jlblancoc committed Oct 29, 2018
1 parent 90d18e4 commit 385742d8bbbc7bd88c289bb085cb750006b81d2d
@@ -8,5 +8,8 @@ define_mrpt_lib(
)

if(BUILD_mrpt-core)

# Fix a MSVC binary-breaking compatibility in MSVC 2017 15.8:
if (MSVC)
target_compile_definitions(mrpt-core PUBLIC -D_ENABLE_EXTENDED_ALIGNED_STORAGE)
endif()
endif()
@@ -21,11 +21,6 @@
#define MRPT_MAX_ALIGN_BYTES 16
#endif

// Fix a MSVC binary-breaking compatibility in MSVC 2017 15.8:
#if defined(_MSC_VER) && !defined(_ENABLE_EXTENDED_ALIGNED_STORAGE)
#define _ENABLE_EXTENDED_ALIGNED_STORAGE
#endif

namespace mrpt
{
void* aligned_malloc(size_t size, size_t alignment);
@@ -73,14 +73,15 @@ namespace mrpt::graphslam
* \ingroup mrpt_graphslam_grp
* \note Implementation can be found in file \a levmarq_impl.h
*/
template <class GRAPH_T>
template <
class GRAPH_T, class FEEDBACK_CALLABLE =
typename graphslam_traits<GRAPH_T>::TFunctorFeedback>
void optimize_graph_spa_levmarq(
GRAPH_T& graph, TResultInfoSpaLevMarq& out_info,
const std::set<mrpt::graphs::TNodeID>* in_nodes_to_optimize = nullptr,
const mrpt::system::TParametersDouble& extra_params =
mrpt::system::TParametersDouble(),
typename graphslam_traits<GRAPH_T>::TFunctorFeedback functor_feedback =
typename graphslam_traits<GRAPH_T>::TFunctorFeedback())
FEEDBACK_CALLABLE functor_feedback = FEEDBACK_CALLABLE())
{
using namespace mrpt;
using namespace mrpt::poses;
@@ -44,6 +44,7 @@ set(MRPT_VERSION_PATCH @CMAKE_MRPT_VERSION_NUMBER_PATCH@)
# Require C++17
if (MSVC)
add_compile_options("/std:c++latest")
add_compile_options("-D_ENABLE_EXTENDED_ALIGNED_STORAGE")
else()
if(${CMAKE_VERSION} VERSION_LESS "3.8.0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")

0 comments on commit 385742d

Please sign in to comment.