Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error on Android #1231

Closed
xiaozhuai opened this issue Jan 25, 2024 · 3 comments · Fixed by #1239
Closed

Build error on Android #1231

xiaozhuai opened this issue Jan 25, 2024 · 3 comments · Fixed by #1239
Labels

Comments

@xiaozhuai
Copy link

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

@gottfriedleibniz
Copy link

gottfriedleibniz commented Jan 25, 2024

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).

@xiaozhuai
Copy link
Author

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 ?

@christophe-lunarg
Copy link

-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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants