[MSVC2015/Cycles] MSVC2015 before update 3 produce invalid builds
[blender.git] / CMakeLists.txt
index 59ddd978c41ebd34746c5403366fb3581ea525aa..1dfa838a5a20df507ddd5240c1b2da34d630c546 100644 (file)
@@ -1283,11 +1283,21 @@ elseif(WIN32)
 
        if(MSVC)
                # Minimum MSVC Version
-               set(_min_ver "18.0.31101")
-               if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${_min_ver})
-                       message(FATAL_ERROR
-                               "Visual Studio 2013 (Update 4, ${_min_ver}) required, "
-                               "found (${CMAKE_CXX_COMPILER_VERSION})")
+               if(MSVC_VERSION EQUAL 1800)
+                       set(_min_ver "18.0.31101")
+                       if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${_min_ver})
+                               message(FATAL_ERROR
+                                       "Visual Studio 2013 (Update 4, ${_min_ver}) required, "
+                                       "found (${CMAKE_CXX_COMPILER_VERSION})")
+                       endif()
+               endif()
+               if(MSVC_VERSION EQUAL 1900)
+                       set(_min_ver "19.0.24210")
+                       if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${_min_ver})
+                               message(FATAL_ERROR
+                                       "Visual Studio 2015 (Update 3, ${_min_ver}) required, "
+                                       "found (${CMAKE_CXX_COMPILER_VERSION})")
+                       endif()
                endif()
                unset(_min_ver)