File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -67,17 +67,17 @@ foreach(type file IN ZIP_LISTS VERSION_TYPE VERSION_FILE)
6767 set (${type} _VERSION_EXTRA ${CMAKE_MATCH_1} )
6868
6969 # Validate all version fields fit in a single byte
70- if (${type} _VERSION_MAJOR GREATER 255)
71- message (FATAL_ERROR "VERSION_MAJOR must be in the range 0-255 (Current ${${type} _VERSION_MAJOR})" )
70+ if (NOT DEFINED ${type} _VERSION_MAJOR OR ${type} _VERSION_MAJOR GREATER 255)
71+ message (FATAL_ERROR "VERSION_MAJOR must be present and in the range of 0-255 (Current: ${${type} _VERSION_MAJOR})" )
7272 endif ()
73- if (${type} _VERSION_MINOR GREATER 255)
74- message (FATAL_ERROR "VERSION_MINOR must be in the range 0-255 (Current ${${type} _VERSION_MINOR})" )
73+ if (NOT DEFINED ${type} _VERSION_MINOR OR ${type} _VERSION_MINOR GREATER 255)
74+ message (FATAL_ERROR "VERSION_MINOR must be present and in the range of 0-255 (Current: ${${type} _VERSION_MINOR})" )
7575 endif ()
76- if (${type} _PATCHLEVEL GREATER 255)
77- message (FATAL_ERROR "PATCHLEVEL must be in the range 0-255 (Current ${${type} _PATCHLEVEL})" )
76+ if (NOT DEFINED ${type} _PATCHLEVEL OR ${type} _PATCHLEVEL GREATER 255)
77+ message (FATAL_ERROR "PATCHLEVEL must be present and in the range of 0-255 (Current: ${${type} _PATCHLEVEL})" )
7878 endif ()
79- if (${type} _VERSION_TWEAK GREATER 255)
80- message (FATAL_ERROR "VERSION_TWEAK must be in the range 0-255 (Current ${${type} _VERSION_TWEAK})" )
79+ if (NOT DEFINED ${type} _VERSION_TWEAK OR ${type} _VERSION_TWEAK GREATER 255)
80+ message (FATAL_ERROR "VERSION_TWEAK must be present and in the range of 0-255 (Current: ${${type} _VERSION_TWEAK})" )
8181 endif ()
8282
8383 # Temporary convenience variables
You can’t perform that action at this time.
0 commit comments