Files
Matthew Woehlke 597c573d7d if: Add DIAGNOSTIC <category> condition
Add an existence check to the `if` command for diagnostic categories,
mirroring the check for policies. Aside from being desirable for
consistency's sake, this will make it easier for users to write logic to
manipulate diagnostics from newer versions of CMake that don't exist
today.
2026-06-16 15:14:13 -04:00

8 lines
203 B
CMake

if(NOT DIAGNOSTIC CMD_AUTHOR)
message(SEND_ERROR "existence check for CMD_AUTHOR failed?!")
endif()
if(DIAGNOSTIC BOGUS)
message(SEND_ERROR "existence check for bogus category succeeded?!")
endif()