Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

COMP: Fix Warning for CMP0135 in remote modules (DownloadClangFormat) #4404

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Utilities/ClangFormat/DownloadClangFormat.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ endif()
if(ITK_FORBID_DOWNLOADS)
message(SEND_ERROR "Attempted to download ClangFormat when ITK_FORBID_DOWNLOADS is ON")
endif()
cmake_policy(PUSH)
cmake_policy(SET CMP0135 NEW)
if(NOT TARGET ClangFormat AND _clang_format_hash)
ExternalProject_Add(
ClangFormat
Expand All @@ -58,3 +60,4 @@ if(NOT TARGET ClangFormat AND _clang_format_hash)
LOG_INSTALL 0
INSTALL_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/ITKClangFormatConfig.cmake)
endif()
cmake_policy(POP)