[Bf-blender-cvs] [1a7b9ce] master: CMake: check for minimum MSVC version

Campbell Barton noreply at git.blender.org
Wed Feb 24 21:40:26 CET 2016


Commit: 1a7b9ce00679c9ec9625db1c0d0d4705442e2e19
Author: Campbell Barton
Date:   Thu Feb 25 07:31:44 2016 +1100
Branches: master
https://developer.blender.org/rB1a7b9ce00679c9ec9625db1c0d0d4705442e2e19

CMake: check for minimum MSVC version

Needed since older versions are unsupported (giving cryptic errors).

===================================================================

M	CMakeLists.txt

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 28c962e..5efd57c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1242,6 +1242,14 @@ elseif(WIN32)
 	add_definitions(-DWIN32)
 
 	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})")
+		endif()
+		unset(_min_ver)
 
 		# needed for some MSVC installations
 		set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")




More information about the Bf-blender-cvs mailing list