I'm using a third-party project with add_subdirectory, this other project declares cmake_minimum_required(VERSION 2.8.11), and with recent CMake I get:
CMake Deprecation Warning at External/libmsym/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
Since this is a separate project (it's fetched as a git submodule) and I have no write permission, I cannot really fix the problem as suggested. If this was configured through ExternalProject, I could use the PATCH_COMMAND feature, but I don't think I can do something similar in this situation. Other than creating a fork for this nitpick, is there any other way of disabling this warning or overriding the cmake_minimum_required statement in the subdirectory?
EDIT: Apparently CMAKE_WARN_DEPRECATED or -Wno-deprecated can do it, but there is some strangeness with the former (it must be saved in the cache for it to work, see Cannot set CMAKE_WARN_DEPRECATED inside the CMakeLists.txt), which makes it cumbersome to toggle locally for a particular add_subdirectory.