g-truc / glm

OpenGL Mathematics (GLM)

Home Page:https://glm.g-truc.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build error on Android

xiaozhuai opened this issue · comments

See also microsoft/vcpkg#36358

Here is the log
install-arm64-android-dbg-out.log

It seems caused by these lines

glm/glm/detail/setup.hpp

Lines 299 to 311 in 33b0eb9

// N2235 Generalized Constant Expressions http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf
// N3652 Extended Constant Expressions http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3652.html
#if (GLM_ARCH & GLM_ARCH_SIMD_BIT) // Compiler SIMD intrinsics don't support constexpr...
# define GLM_HAS_CONSTEXPR 0
#elif (GLM_COMPILER & GLM_COMPILER_CLANG)
# define GLM_HAS_CONSTEXPR __has_feature(cxx_relaxed_constexpr)
#elif (GLM_LANG & GLM_LANG_CXX14_FLAG)
# define GLM_HAS_CONSTEXPR 1
#else
# define GLM_HAS_CONSTEXPR ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && GLM_HAS_INITIALIZER_LISTS && (\
((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL17)) || \
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC15))))
#endif

In the install logs you are compiling with -Weverything. Is this intentional?

Ah, -Weverything was moved into the main CMakeLists and a variety of pragma clang diagnostic's were added in source to compensate. Now, the CMakeLists expects an explicit standard flag to be enabled so it can disable the c++98-compat checks.

Don't think the documentation has been updated to reflect this (ergonomics? i.e., should -Weverything be enabled by default outside of the CI).

In the install logs you are compiling with -Weverything. Is this intentional?

No, I just specify following options.

-DGLM_BUILD_LIBRARY=ON
-DGLM_BUILD_TESTS=OFF
-DGLM_BUILD_INSTALL=ON

Should I pass GLM_ENABLE_CXX_xxxxx ?

-Weverything includes -Wc++98-compat. If you don't want to get these warnings, you can build with -Weverything and -Wnoc++98-compat.

No need to pass GLM_ENABLE_CXX_xxxxx.