Make MuJoCo buildable with Visual Studio 2019 update 7 and earlier.
Also enable MSVC 2019 builds on GitHub Actions. Fixes #862. PiperOrigin-RevId: 531167754 Change-Id: I17687fb287c38a7f2245c6f7ba59a22b772e3a8c
This commit is contained in:
committed by
Copybara-Service
parent
09a8e59824
commit
133b8d0978
@@ -94,6 +94,13 @@ jobs:
|
|||||||
-DMUJOCO_HARDEN:BOOL=ON
|
-DMUJOCO_HARDEN:BOOL=ON
|
||||||
tmpdir: "/tmp"
|
tmpdir: "/tmp"
|
||||||
- os: windows-2022
|
- os: windows-2022
|
||||||
|
cmake_args: >-
|
||||||
|
-DCMAKE_SYSTEM_VERSION="10.0.22621.0"
|
||||||
|
cmake_build_args: "-- -m"
|
||||||
|
tmpdir: "C:/Temp"
|
||||||
|
- os: windows-2019
|
||||||
|
cmake_args: >-
|
||||||
|
-DCMAKE_SYSTEM_VERSION="10.0.22621.0"
|
||||||
cmake_build_args: "-- -m"
|
cmake_build_args: "-- -m"
|
||||||
tmpdir: "C:/Temp"
|
tmpdir: "C:/Temp"
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,13 @@
|
|||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
#elif !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L
|
||||||
|
// No C11 support in Visual Studio 2019 update 7 and earlier.
|
||||||
|
// However, MSVC allows C++ alignas to be used in C code, so
|
||||||
|
// we can just skip the #include <stdalign.h>.
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
#error "Compiler does not support C11."
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <stdalign.h>
|
#include <stdalign.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -43,7 +50,7 @@ MJAPI int mj_collideOBB(const mjtNum aabb1[6], const mjtNum aabb2[6],
|
|||||||
const mjtNum xpos2[3], const mjtNum xmat2[9],
|
const mjtNum xpos2[3], const mjtNum xmat2[9],
|
||||||
mjtNum product[36], mjtNum offset[12], mjtByte* initialize);
|
mjtNum product[36], mjtNum offset[12], mjtByte* initialize);
|
||||||
|
|
||||||
// broad phase collistion detection; return list of body pairs for narrow phase
|
// broad phase collision detection; return list of body pairs for narrow phase
|
||||||
int mj_broadphase(const mjModel* m, mjData* d, int* bodypair, int maxpair);
|
int mj_broadphase(const mjModel* m, mjData* d, int* bodypair, int maxpair);
|
||||||
|
|
||||||
// test two geoms for collision, apply filters, add to contact list
|
// test two geoms for collision, apply filters, add to contact list
|
||||||
@@ -51,7 +58,7 @@ int mj_broadphase(const mjModel* m, mjData* d, int* bodypair, int maxpair);
|
|||||||
void mj_collideGeoms(const mjModel* m, mjData* d,
|
void mj_collideGeoms(const mjModel* m, mjData* d,
|
||||||
int g1, int g2, int flg_user, mjtNum usermargin);
|
int g1, int g2, int flg_user, mjtNum usermargin);
|
||||||
|
|
||||||
// number of possible collisions based on fitlers and geom types
|
// number of possible collisions based on filters and geom types
|
||||||
int mj_contactFilter(int contype1, int conaffinity1,
|
int mj_contactFilter(int contype1, int conaffinity1,
|
||||||
int contype2, int conaffinity2);
|
int contype2, int conaffinity2);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user