From 744a3b9cb26a734487264eec3e9e6dacb28daa73 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 3 Apr 2011 07:48:33 +0000 Subject: [PATCH] fix cmake for when BLENDER_VERSION_CHAR is not set. --- build_files/cmake/macros.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 4a9c55d81cd..24dc058c4b0 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -350,7 +350,12 @@ macro(get_blender_version) message(FATAL_ERROR "Version parsing failed for BLENDER_SUBVERSION") endif() - if(NOT ${_out_version_char} MATCHES "[a-z]+") + # clumsy regex, only single char are ok but it could be unset + + string(LENGTH "${_out_version_char}" _out_version_char_len) + if(NOT _out_version_char_len EQUAL 1) + set(_out_version_char "") + elseif(NOT ${_out_version_char} MATCHES "[a-z]+") message(FATAL_ERROR "Version parsing failed for BLENDER_VERSION_CHAR") endif() -- 2.28.0