Commit fa2a7fbc authored by seanyen's avatar seanyen
Browse files

Fix windows/MSVC build.

parent c7b30f6c
......@@ -109,6 +109,8 @@ SET(${PROJECT_NAME}_HEADERS
INCLUDE_DIRECTORIES(${${PROJECT_NAME}_BINARY_DIR}/include)
INCLUDE_DIRECTORIES(${${PROJECT_NAME}_SOURCE_DIR}/include)
LINK_DIRECTORIES(${PYTHON_LIBRARY_DIRS})
# ----------------------------------------------------
# --- TARGETS ----------------------------------------
# ----------------------------------------------------
......@@ -130,6 +132,7 @@ ADD_LIBRARY(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "${PROJECT_NAME}${PYTHON_SOABI}")
TARGET_LINK_BOOST_PYTHON(${PROJECT_NAME})
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
PKG_CONFIG_USE_DEPENDENCY(${PROJECT_NAME} eigen3)
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
......
......@@ -300,7 +300,7 @@ namespace eigenpy
// Check if the Scalar type of the obj_ptr is compatible with the Scalar type of MatType
if ((PyArray_ObjectType(reinterpret_cast<PyObject *>(obj_ptr), 0)) == NPY_INT)
{
if(not FromTypeToType<int,typename MatType::Scalar>::value)
if(!FromTypeToType<int,typename MatType::Scalar>::value)
{
#ifndef NDEBUG
std::cerr << "The Python matrix scalar type (int) cannot be converted into the scalar type of the Eigen matrix. Loss of arithmetic precision" << std::endl;
......@@ -310,7 +310,7 @@ namespace eigenpy
}
else if ((PyArray_ObjectType(reinterpret_cast<PyObject *>(obj_ptr), 0)) == NPY_LONG)
{
if(not FromTypeToType<long,typename MatType::Scalar>::value)
if(!FromTypeToType<long,typename MatType::Scalar>::value)
{
#ifndef NDEBUG
std::cerr << "The Python matrix scalar type (long) cannot be converted into the scalar type of the Eigen matrix. Loss of arithmetic precision" << std::endl;
......@@ -320,7 +320,7 @@ namespace eigenpy
}
else if ((PyArray_ObjectType(reinterpret_cast<PyObject *>(obj_ptr), 0)) == NPY_FLOAT)
{
if(not FromTypeToType<float,typename MatType::Scalar>::value)
if(!FromTypeToType<float,typename MatType::Scalar>::value)
{
#ifndef NDEBUG
std::cerr << "The Python matrix scalar type (float) cannot be converted into the scalar type of the Eigen matrix. Loss of arithmetic precision" << std::endl;
......@@ -330,7 +330,7 @@ namespace eigenpy
}
else if ((PyArray_ObjectType(reinterpret_cast<PyObject *>(obj_ptr), 0)) == NPY_DOUBLE)
{
if(not FromTypeToType<double,typename MatType::Scalar>::value)
if(!FromTypeToType<double,typename MatType::Scalar>::value)
{
#ifndef NDEBUG
std::cerr << "The Python matrix scalar (double) type cannot be converted into the scalar type of the Eigen matrix. Loss of arithmetic precision." << std::endl;
......
......@@ -27,7 +27,7 @@ namespace eigenpy
template<typename T>
inline void expose()
{
if(not register_symbolic_link_to_registered_type<T>())
if(!register_symbolic_link_to_registered_type<T>())
internal::call_expose<T>::run();
}
}
......
......@@ -11,19 +11,19 @@
// For old Eigen versions, EIGEN_DEVICE_FUNC is not defined.
// We must define it just in the scope of this file.
#if not EIGEN_VERSION_AT_LEAST(3,2,90)
#if !EIGEN_VERSION_AT_LEAST(3,2,90)
#define EIGEN_DEVICE_FUNC
#endif
namespace eigenpy
{
template<typename PlainObjectType>
struct Ref : Eigen::Ref<PlainObjectType,EIGENPY_DEFAULT_ALIGNMENT_VALUE,typename StrideType<PlainObjectType>::type>
template<typename PlainObjectTypeT>
struct Ref : Eigen::Ref<PlainObjectTypeT,EIGENPY_DEFAULT_ALIGNMENT_VALUE,typename StrideType<PlainObjectTypeT>::type>
{
public:
typedef Eigen::Ref<PlainObjectType,EIGENPY_DEFAULT_ALIGNMENT_VALUE,typename StrideType<PlainObjectType>::type> Base;
typedef Eigen::Ref<PlainObjectTypeT,EIGENPY_DEFAULT_ALIGNMENT_VALUE,typename eigenpy::template StrideType<PlainObjectTypeT>::type> Base;
private:
typedef Eigen::internal::traits<Base> Traits;
template<typename Derived>
......@@ -83,7 +83,7 @@ namespace eigenpy
}; // struct Ref<PlainObjectType>
}
#if not EIGEN_VERSION_AT_LEAST(3,2,90)
#if !EIGEN_VERSION_AT_LEAST(3,2,90)
#undef EIGEN_DEVICE_FUNC
#endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment