diff options
author | Brad King <brad.king@kitware.com> | 2020-04-23 13:15:10 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-04-23 13:15:24 (GMT) |
commit | 61ac8e6dfa06d82ff2ef3ae3f0076fb9aa65d542 (patch) | |
tree | 1aa5e94ee8bbb094e22cc6bd4359443fec07fc93 /Modules | |
parent | b779cb13b4462ad3245a442bb7c8fcd70e3faac6 (diff) | |
parent | 306a1ba96073175ddc0c4de4d5f17b44d432da33 (diff) | |
download | CMake-61ac8e6dfa06d82ff2ef3ae3f0076fb9aa65d542.zip CMake-61ac8e6dfa06d82ff2ef3ae3f0076fb9aa65d542.tar.gz CMake-61ac8e6dfa06d82ff2ef3ae3f0076fb9aa65d542.tar.bz2 |
Merge topic 'remove-documentation-module'
306a1ba960 Modules/Documentation: remove
ad4487a96a cmIncludeCommand: add infrastructure for deprecated modules
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4617
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Documentation.cmake | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Modules/Documentation.cmake b/Modules/Documentation.cmake index aaf24f6..c297231 100644 --- a/Modules/Documentation.cmake +++ b/Modules/Documentation.cmake @@ -9,6 +9,30 @@ This module provides support for the VTK documentation framework. It relies on several tools (Doxygen, Perl, etc). #]=======================================================================] +cmake_policy(GET CMP0106 _Documentation_policy) + +if (_Documentation_policy STREQUAL "NEW") + message(FATAL_ERROR + "Documentation.cmake is VTK-specific code and should not be used in " + "non-VTK projects. This logic in this module is best shipped with the " + "project using it rather than with CMake. This is now an error according " + "to policy CMP0106.") +else () + +if (_Documentation_policy STREQUAL "") + # Ignore the warning if the project is detected as VTK itself. + if (NOT CMAKE_PROJECT_NAME STREQUAL "VTK" AND + NOT PROJECT_NAME STREQUAL "VTK") + cmake_policy(GET_WARNING CMP0106 _Documentation_policy_warning) + message(AUTHOR_WARNING + "${_Documentation_policy_warning}\n" + "Documentation.cmake is VTK-specific code and should not be used in " + "non-VTK projects. This logic in this module is best shipped with the " + "project using it rather than with CMake.") + endif () + unset(_Documentation_policy_warning) +endif () + # # Build the documentation ? # @@ -44,3 +68,7 @@ if (BUILD_DOCUMENTATION) # endif () + +endif () + +unset(_Documentation_policy) |