Skip to content

Commit 3ccfa14

Browse files
committed
BUG: Fix message about UseITK begin deprecated
Disable printing the UseITK deprecated message when ITK_LEGACY_SILENT is set. Also fix the formatting of the message, to escape variable expression.
1 parent ce1b88f commit 3ccfa14

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

CMake/UseITK.cmake

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,16 @@
1616

1717
set(
1818
_use_itk_msg
19-
"CMake/UseITK.cmake is deprecated. "
20-
"Please update CMakeLists.txt to use `find_package(ITK)` and link to `${ITK_INTERFACE_LIBRARIES}`."
19+
[=[
20+
CMake/UseITK.cmake is deprecated.
21+
Please update CMakeLists.txt to use `find_package(ITK)` and link to "${ITK_INTERFACE_LIBRARIES}".
22+
]=]
2123
)
22-
message(AUTHOR_WARNING "${_use_itk_msg}")
23-
if(${ITK_FUTURE_LEGACY_REMOVE})
24+
25+
if(ITK_FUTURE_LEGACY_REMOVE)
2426
message(FATAL_ERROR "${_use_itk_msg}")
27+
elseif(NOT ITK_LEGACY_SILENT)
28+
message(AUTHOR_WARNING "${_use_itk_msg}")
2529
endif()
2630

2731
# Add compiler flags needed to use ITK.

0 commit comments

Comments
 (0)