opensim-org / opensim-core

SimTK OpenSim C++ libraries and command-line applications, and Java/Python wrapping.
https://opensim.stanford.edu
Apache License 2.0
800 stars 323 forks source link

Update Examples to Use c++14 #3931

Closed alexbeattie42 closed 1 month ago

alexbeattie42 commented 1 month ago

Fixes issue #3929

Brief summary of changes

Update CMakeLists.txt files to use c++14

Testing I've completed

Built examples independently (from an open-sim core installation) and everything compiles and runs.

Looking for feedback on...

None

CHANGELOG.md (choose one)


This change is Reviewable

alexbeattie42 commented 1 month ago

Updated comments for c++14

aymanhab commented 1 month ago

One follow up question related to this change. Would it be a problem for dependencies if they were built with C++11 flags/settings (e.g. Simbody, and the third party dependencies for Moco) Just wanted to know if this has been assessed. @adamkewley may have performed this assessment since he's been on the forefront of upgrades in the osimCreator project.

adamkewley commented 1 month ago

One follow up question related to this change. Would it be a problem for dependencies if they were built with C++11 flags/settings (e.g. Simbody, and the third party dependencies for Moco) Just wanted to know if this has been assessed. @adamkewley may have performed this assessment since he's been on the forefront of upgrades in the osimCreator project.

It's completely fine. Recommended, even, in the case where the code doesn't need a higher level. OSC's compiling with C++20, OpenSim is C++14, and simbody is C++11. The other dependencies are whatever they are. Haven't had any issues with it via clang, gcc, or MSVC on Linux/Mac/Windows, with/without libASAN, debugging, etc. etc.

aymanhab commented 1 month ago

Awesome, thanks much @adamkewley 👍

nickbianco commented 1 month ago

Per @adamkewley's comment, let's merge. Thanks @alexbeattie42!