robotology / osqp-eigen

Simple Eigen-C++ wrapper for OSQP library
https://robotology.github.io/osqp-eigen/
BSD 3-Clause "New" or "Revised" License
393 stars 117 forks source link

Add CI pipeline with Github Actions #30

Closed GiulioRomualdi closed 4 years ago

S-Dafarra commented 4 years ago

I guess we do need this :grin:

GiulioRomualdi commented 4 years ago

On windows is still failing with the following error

2020-05-14T10:42:58.3914037Z D:\a\osqp-eigen\osqp-eigen\tests\MPCTest.cpp(75,14): error C2065: 'M_PI': undeclared identifier [D:\a\osqp-eigen\osqp-eigen\build\tests\MPCUnitTests.vcxproj]

even if I added https://github.com/robotology/osqp-eigen/blob/bb6361f5326da52aa0fc972f46432405537bbc6c/tests/MPCTest.cpp#L20-L21

Do you have any hints? @S-Dafarra @traversaro

traversaro commented 4 years ago

On windows is still failing with the following error

2020-05-14T10:42:58.3914037Z D:\a\osqp-eigen\osqp-eigen\tests\MPCTest.cpp(75,14): error C2065: 'M_PI': undeclared identifier [D:\a\osqp-eigen\osqp-eigen\build\tests\MPCUnitTests.vcxproj]

even if I added

https://github.com/robotology/osqp-eigen/blob/bb6361f5326da52aa0fc972f46432405537bbc6c/tests/MPCTest.cpp#L20-L21

Do you have any hints? @S-Dafarra @traversaro

Either the math.h or cmath header has been transitively included by the headers included before the line that defines _USE_MATH_DEFINES in that compilation unit. To fix this, either move the definition of _USE_MATH_DEFINES before any other include, or pass it via command line (i.e. via CMake's target_compile_definitions).