daid / EmptyEpsilon

Open source bridge simulator. Build with the SeriousProton engine.
https://daid.github.io/EmptyEpsilon/
GNU General Public License v2.0
520 stars 173 forks source link

Build Errors with GLM 1.0.0 #2111

Open jstsmthrgk opened 1 month ago

jstsmthrgk commented 1 month ago

Appearantly some features are now gated behind a feature flag and have to be enable with

#define GLM_ENABLE_EXPERIMENTAL

before including, i came upon this issue as I tried to get the new version to compile on Arch Linux, I found the stopgap solution for building here: https://github.com/NixOS/nixpkgs/pull/308253#issuecomment-2106371795 (i.e. passing -DCMAKE_CXX_FLAGS=-DGLM_ENABLE_EXPERIMENTAL to cmake) but it should probably just be put into the code itself.

oznogon commented 1 month ago
error "GLM: GLM_GTX_component_wise is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."

invoked:

GLM_GTX_component_wise
GLM_GTX_norm
GLM_GTX_quaternion

all errors via:

In file included from /home/oznogon/git/daid/EmptyEpsilon/_build/_deps/glm-src/glm/gtx/norm.hpp:19,
                 from /home/oznogon/git/daid/SeriousProton/src/vectorUtils.h:7,
...
───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: SeriousProton/src/vectorUtils.h
───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ #ifndef SFML_EXTRA_VECTOR_UTILS_H
   2   │ #define SFML_EXTRA_VECTOR_UTILS_H
   3   │ 
   4   │ #include <math.h>
   5   │ 
   6   │ #include <glm/geometric.hpp> //for glm::lenght and glm::dot
   7  >> #include <glm/gtx/norm.hpp>  //for glm::lenght2
   8   │ 

glm/gtx/norm.hpp also invoked in EmptyEpsilon/src/mesh.cpp and particleEffect.cpp

daid commented 1 month ago

I haven't checked how much of GLM we are using, but I might consider replacing it. I've seen in another project that it adds a significant amount of compile time for something that we mainly use as a few structs with overloaded operators.