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

Fix CMake failing with Android NDK 27+ #2361

Merged

Conversation

frenzibyte
Copy link
Contributor

I'm not well versed with the project so I'm not sure how to describe this any further, but we've encountered this error in one of our tools which relies on this repo:

CMake Warning (dev) at C:/Android/android-sdk/ndk/27.0.12077973/build/cmake/flags.cmake:46 (if):
  Policy CMP0057 is not set: Support new IN_LIST if() operator.  Run "cmake
  --help-policy CMP0057" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  IN_LIST will be interpreted as an operator when the policy is set to NEW.
  Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.30/Modules/Platform/Android-Clang.cmake:23 (include)
  C:/Program Files/CMake/share/cmake-3.30/Modules/Platform/Android-Clang-CXX.cmake:1 (include)
  C:/Program Files/CMake/share/cmake-3.30/Modules/CMakeCXXInformation.cmake:48 (include)
  ext/SPIRV-Cross/CMakeLists.txt:31 (project)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at C:/Android/android-sdk/ndk/27.0.12077973/build/cmake/flags.cmake:46 (if):
  if given arguments:

    "hwaddress" "IN_LIST" "ANDROID_SANITIZE"

  Unknown arguments specified
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.30/Modules/Platform/Android-Clang.cmake:23 (include)
  C:/Program Files/CMake/share/cmake-3.30/Modules/Platform/Android-Clang-CXX.cmake:1 (include)
  C:/Program Files/CMake/share/cmake-3.30/Modules/CMakeCXXInformation.cmake:48 (include)
  ext/SPIRV-Cross/CMakeLists.txt:31 (project)

It appears that since Android NDK 27, the cmake files in there require the CMP0057 policy to be set at this repo's CMakeLists file.

@CLAassistant
Copy link

CLAassistant commented Aug 8, 2024

CLA assistant check
All committers have signed the CLA.

frenzibyte added a commit to frenzibyte/veldrid-spirv that referenced this pull request Aug 8, 2024
frenzibyte added a commit to frenzibyte/veldrid-spirv that referenced this pull request Aug 8, 2024
See KhronosGroup/SPIRV-Cross#2361

deo this

sigh

Revert "sigh"

This reverts commit d15c58e.

Update build.yml

more

stuff

wt

once more
Copy link
Contributor

@HansKristian-Work HansKristian-Work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems strange to put it here since SPIRV-Cross does not use IN_LIST, but I guess it's harmless.

@HansKristian-Work HansKristian-Work merged commit 5c42447 into KhronosGroup:main Aug 20, 2024
6 checks passed
@frenzibyte frenzibyte deleted the fix-cmake-on-android branch August 20, 2024 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants