Browse Source

CMake: avoid warnings with CMake 3.10+ and CMAKE_AUTOMOC set.

Co-authored-by: Andy Maloney <asmaloney@gmail.com>
pull/518/head
Vladimír Vondruš 5 years ago
parent
commit
90126a4ded
  1. 6
      CMakeLists.txt
  2. 2
      doc/changelog.dox

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

2
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

Loading…
Cancel
Save