Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'build_files')
-rw-r--r--build_files/cmake/macros.cmake7
1 files changed, 6 insertions, 1 deletions
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()