From 4a9747f13f159d985e8bfd3a38ad2ad29a241d5e Mon Sep 17 00:00:00 2001 From: Yiming Chen Date: Mon, 20 Nov 2017 17:22:16 +0800 Subject: [PATCH] Fix the compilation on OSX by correcting the usage of Eigen::aligned_allocator. --- CMakeLists.txt | 9 +-------- okvis_common/include/okvis/FrameTypedefs.hpp | 4 ++-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c7415ab..f71fb340 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,14 +54,7 @@ else() message(STATUS "Building with build type '${CMAKE_BUILD_TYPE}'") endif() -if(APPLE) - # The clang compiler (on osx) is somehow much more strict - # than the compilers on ubuntu and so this does not seem - # possible on OSX just yet. - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -std=c++11 -fPIC") -else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -std=c++11 -fPIC") -endif() +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -std=c++11 -fPIC") if(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "arm*") message(STATUS "ARM processor detected, will attempt to use NEON.") diff --git a/okvis_common/include/okvis/FrameTypedefs.hpp b/okvis_common/include/okvis/FrameTypedefs.hpp index eb6d97bd..d2bcc391 100644 --- a/okvis_common/include/okvis/FrameTypedefs.hpp +++ b/okvis_common/include/okvis/FrameTypedefs.hpp @@ -171,9 +171,9 @@ struct MapPoint typedef std::vector > MapPointVector; typedef std::map, - Eigen::aligned_allocator > PointMap; + Eigen::aligned_allocator > > PointMap; typedef std::map, - Eigen::aligned_allocator > TransformationMap; + Eigen::aligned_allocator > > TransformationMap; /// \brief For convenience to pass associations - also contains the 3d points. struct Observation