Cleanup: Fix build error with MSVC

Previously eigens internal include order somehow implicitly provided
M_PI and friends. The recent eigen version bump broke this implicit
behaviour, better to be explicit that we need the math defines for MSVC.
This commit is contained in:
Ray molenkamp 2019-08-21 10:38:33 -06:00
parent 34921e9e56
commit 6086a6d939
4 changed files with 7 additions and 6 deletions

View File

@ -27,6 +27,10 @@ set(INC_SYS
${EIGEN3_INCLUDE_DIRS}
)
if(WIN32)
add_definitions(-D_USE_MATH_DEFINES)
endif()
set(SRC
intern/IK_QJacobian.cpp
intern/IK_QJacobianSolver.cpp

View File

@ -38,6 +38,9 @@ set(LIB
)
if(WITH_LIBMV)
if(WIN32)
add_definitions(-D_USE_MATH_DEFINES)
endif()
add_definitions(${GFLAGS_DEFINES})
add_definitions(${GLOG_DEFINES})
add_definitions(${CERES_DEFINES})

View File

@ -25,9 +25,6 @@
// smart coder went through the TODO's and made the suggested performance
// enhancements.
// Necessary for M_E when building with MSVC.
#define _USE_MATH_DEFINES
#include "libmv/tracking/track_region.h"
#include <Eigen/SVD>

View File

@ -20,9 +20,6 @@
#ifndef LIBMV_TRACKING_TRACK_REGION_H_
// Necessary for M_E when building with MSVC.
#define _USE_MATH_DEFINES
#include "libmv/image/image.h"
#include "libmv/image/sample.h"
#include "libmv/numeric/numeric.h"