ios-cmake icon indicating copy to clipboard operation
ios-cmake copied to clipboard

example: avoid cmake_minimum deprecation warning

Open scivision opened this issue 2 years ago • 1 comments

Apple Silicon in general requires CMake >= 3.19.2, so it's unlikely to be an issue.

This avoids warning with CMake >= 3.27:

 % cmake -Bbuild -G Xcode -DCMAKE_TOOLCHAIN_FILE=../../ios.toolchain.cmake -DPLATFORM=OS64

CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

scivision avatar Sep 01 '23 16:09 scivision

Seems the enable_language() directives are needed. Moving them (CXX, OBJC) to the project-definition causes issues since the toolchain require explicit language support and the project definition is not propagating to the correct internal directives in CMake..?

leetal avatar Sep 06 '23 07:09 leetal