ipc-sim / IPC

Incremental Potential Contact (IPC) is for robust and accurate time stepping of nonlinear elastodynamics. IPC guarantees intersection- and inversion-free trajectories regardless of materials, time-step sizes, velocities, or deformation severity.
https://ipc-sim.github.io/
MIT License
558 stars 73 forks source link

Maybe directly set LIBIGL_USE_STATIC_LIBRARY to be always OFF #16

Closed wzheng21 closed 3 years ago

wzheng21 commented 3 years ago

Hi

There're several places requiring compiler to be C++17 compliant in the code.

At the same time, the CMakeLists.txt allows users to set LIBIGL_USE_STATIC_LIBRARY to be ON. If user really does so, it will lead to compilation error from LIBIGL. The reason is that there're STL functions in libigl being removed in C++17.

Suggestions: either

  1. Remove the option(LIBIGL_USE_STATIC_LIBRARY ... in CMakeLists.txt
  2. OR update README.md to tell users they cannot build with LIBIGL_USE_STATIC_LIBRARY=ON

Additional info: the error I got with ON:

/home/wzheng/cipc/external/libigl/include/igl/blue_noise.cpp:212:10: error: no
      member named 'random_shuffle' in namespace 'std'
    std::random_shuffle(std::begin(N), std::end(N));

Thanks

liminchen commented 3 years ago

Sure, added a comment in the CMakeLists.txt. Thanks!