mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
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.
8 lines
203 B
CMake
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()
|