Compiling circuitpet firmware using Arduino/clion

I am trying to compile the circuitpet firmware using Arduino and clion (via cmake) but 8 am having an issue with the glm library being used. I assume there is a configuration miss match somewhere as the glm LIbrary is attempting to use std::log2 and other standard functions that the compiler is not able to utilise.

I assume that something is setting the wrong language version settings somewhere but at the moment all i can get out of the build system is the following output:

In file included from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\exponential.hpp:110:0,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_geometric.inl:1,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\geometric.hpp:116,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_matrix.inl:1,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\matrix.hpp:161,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail\type_mat2x2.inl:1,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail\type_mat2x2.hpp:176,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\ext\matrix_double2x2.hpp:5,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm/mat2x2.hpp:5,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm/glm.hpp:119,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm.h:4,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\src\GameEngine\PixelDim.hpp:3,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\src\UserHWTest.h:9,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\CircuitPet-Firmware.ino:10:
c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_exponential.inl:14:14: error: 'std::log2' has not been declared
   using std::log2;
              ^
In file included from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\exponential.hpp:110:0,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_geometric.inl:1,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\geometric.hpp:116,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_matrix.inl:1,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\matrix.hpp:161,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail\type_mat2x2.inl:1,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail\type_mat2x2.hpp:176,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\ext\matrix_double2x2.hpp:5,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm/mat2x2.hpp:5,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm/glm.hpp:119,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm.h:4,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\src\GameEngine\PixelDim.hpp:3,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\src\UserHWTest.h:9,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\CircuitPet-Firmware.ino:10:
c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_exponential.inl:94:16: error: 'std::exp2' has not been declared
     using std::exp2;
                ^
In file included from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\common.hpp:538:0,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_geometric.inl:2,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\geometric.hpp:116,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_matrix.inl:1,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\matrix.hpp:161,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail\type_mat2x2.inl:1,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail\type_mat2x2.hpp:176,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\ext\matrix_double2x2.hpp:5,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm/mat2x2.hpp:5,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm/glm.hpp:119,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm.h:4,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\src\GameEngine\PixelDim.hpp:3,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\src\UserHWTest.h:9,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\CircuitPet-Firmware.ino:10:
c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_common.inl:42:16: error: 'std::round' has not been declared
   using ::std::round;
                ^
c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_common.inl:55:16: error: 'std::trunc' has not been declared
   using ::std::trunc;
                ^
c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_common.inl:742:14: error: 'std::fma' has not been declared
   using std::fma;
              ^
In file included from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm/trigonometric.hpp:210:0,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm/glm.hpp:129,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm.h:4,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\src\GameEngine\PixelDim.hpp:3,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\src\UserHWTest.h:9,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\CircuitPet-Firmware.ino:10:
C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm/detail/func_trigonometric.inl:134:14: error: 'std::asinh' has not been declared
   using std::asinh;
              ^
In file included from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm/trigonometric.hpp:210:0,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm/glm.hpp:129,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm.h:4,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\src\GameEngine\PixelDim.hpp:3,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\src\UserHWTest.h:9,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\CircuitPet-Firmware.ino:10:
C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm/detail/func_trigonometric.inl:153:14: error: 'std::acosh' has not been declared
   using std::acosh;
              ^
C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm/detail/func_trigonometric.inl:174:14: error: 'std::atanh' has not been declared
   using std::atanh;
              ^
In file included from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\common.hpp:538:0,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_geometric.inl:2,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\geometric.hpp:116,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_matrix.inl:1,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\matrix.hpp:161,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail\type_mat2x2.inl:1,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail\type_mat2x2.hpp:176,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\ext\matrix_double2x2.hpp:5,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm/mat2x2.hpp:5,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm/glm.hpp:119,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm.h:4,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\src\GameEngine\PixelDim.hpp:3,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\src\UserHWTest.h:9,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\CircuitPet-Firmware.ino:10:
c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_common.inl: In instantiation of 'static glm::vec<L, T, Q> glm::detail::compute_round<L, T, Q, Aligned>::call(const glm::vec<L, T, Q>&) [with int L = 2; T = float; glm::qualifier Q = (glm::qualifier)0u; bool Aligned = false]':
c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_common.inl:324:76:   required from 'glm::vec<L, T, Q> glm::round(const glm::vec<L, T, Q>&) [with int L = 2; T = float; glm::qualifier Q = (glm::qualifier)0u]'
C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm/detail/func_packing.inl:17:80:   required from here
c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_common.inl:207:50: error: no matching function for call to 'glm::detail::functor1<glm::vec, 2, float, float, (glm::qualifier)0u>::call(<unresolved overloaded function type>, const glm::vec<2, float, (glm::qualifier)0u>&)'
    return detail::functor1<vec, L, T, T, Q>::call(round, x);
                                                  ^
In file included from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_exponential.inl:5:0,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\exponential.hpp:110,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_geometric.inl:1,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\geometric.hpp:116,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_matrix.inl:1,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\matrix.hpp:161,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail\type_mat2x2.inl:1,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail\type_mat2x2.hpp:176,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\ext\matrix_double2x2.hpp:5,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm/mat2x2.hpp:5,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm/glm.hpp:119,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm.h:4,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\src\GameEngine\PixelDim.hpp:3,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\src\UserHWTest.h:9,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\CircuitPet-Firmware.ino:10:
c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/_vectorize.hpp:21:56: note: candidate: static constexpr vec<2, R, Q> glm::detail::functor1<vec, 2, R, T, Q>::call(R (*)(T), const vec<2, T, Q>&) [with vec = glm::vec; R = float; T = float; glm::qualifier Q = (glm::qualifier)0u]
   GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<2, R, Q> call(R (*Func) (T x), vec<2, T, Q> const& v)
                                                        ^
c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/_vectorize.hpp:21:56: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float (*)(float)'
In file included from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\common.hpp:538:0,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_geometric.inl:2,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\geometric.hpp:116,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_matrix.inl:1,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\matrix.hpp:161,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail\type_mat2x2.inl:1,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail\type_mat2x2.hpp:176,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\ext\matrix_double2x2.hpp:5,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm/mat2x2.hpp:5,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm/glm.hpp:119,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm.h:4,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\src\GameEngine\PixelDim.hpp:3,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\src\UserHWTest.h:9,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\CircuitPet-Firmware.ino:10:
c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_common.inl: In instantiation of 'static glm::vec<L, T, Q> glm::detail::compute_round<L, T, Q, Aligned>::call(const glm::vec<L, T, Q>&) [with int L = 4; T = float; glm::qualifier Q = (glm::qualifier)0u; bool Aligned = false]':
c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_common.inl:324:76:   required from 'glm::vec<L, T, Q> glm::round(const glm::vec<L, T, Q>&) [with int L = 4; T = float; glm::qualifier Q = (glm::qualifier)0u]'
C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm/detail/func_packing.inl:75:77:   required from here
c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_common.inl:207:50: error: no matching function for call to 'glm::detail::functor1<glm::vec, 4, float, float, (glm::qualifier)0u>::call(<unresolved overloaded function type>, const glm::vec<4, float, (glm::qualifier)0u>&)'
    return detail::functor1<vec, L, T, T, Q>::call(round, x);
                                                  ^
In file included from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_exponential.inl:5:0,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\exponential.hpp:110,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_geometric.inl:1,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\geometric.hpp:116,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/func_matrix.inl:1,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\matrix.hpp:161,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail\type_mat2x2.inl:1,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail\type_mat2x2.hpp:176,
                 from c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\ext\matrix_double2x2.hpp:5,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm/mat2x2.hpp:5,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm/glm.hpp:119,
                 from C:\Users\Russell\AppData\Local\Arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm/glm.h:4,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\src\GameEngine\PixelDim.hpp:3,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\src\UserHWTest.h:9,
                 from C:\Users\Russell\esp dev\circuitmess\CircuitPet-Firmware\CircuitPet-Firmware.ino:10:
c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/_vectorize.hpp:39:56: note: candidate: static constexpr vec<4, R, Q> glm::detail::functor1<vec, 4, R, T, Q>::call(R (*)(T), const vec<4, T, Q>&) [with vec = glm::vec; R = float; T = float; glm::qualifier Q = (glm::qualifier)0u]
   GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<4, R, Q> call(R (*Func) (T x), vec<4, T, Q> const& v)
                                                        ^
c:\users\russell\appdata\local\arduino15\packages\cm\hardware\esp32\1.6.2\libraries\glm\glm\detail/_vectorize.hpp:39:56: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float (*)(float)'
exit status 1

Compilation error: exit status 1