diff --git a/CMakeLists.txt b/CMakeLists.txt index 593c31166..dfa87394c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,6 +30,12 @@ if(HUNTER_ENABLED) include(${CMAKE_CURRENT_LIST_DIR}/package/hunter/HunterInit.cmake) endif() +# If CMAKE_AUTOMOC is set, all uses of corrade_add_resource() would otherwise +# complain on 3.10 that AUTOMOC is not processing GENERATED files +if(POLICY CMP0071) + cmake_policy(SET CMP0071 NEW) +endif() + project(Magnum CXX) if(HUNTER_ENABLED) diff --git a/doc/changelog.dox b/doc/changelog.dox index 9626ca85d..0f31439ec 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -359,6 +359,8 @@ See also: same effect. See @ref building-cross-android, @ref platforms-android and [mosra/magnum#310](https://github.com/mosra/magnum/issues/310) for more information. +- Suppressing a CMake policy-related warning if the global `CMAKE_AUTOMOC` is + set on CMake 3.10+ (see [mosra/magnum#504](https://github.com/mosra/magnum/pull/504)) @subsection changelog-latest-bugfixes Bug fixes