Squashed 'third_party/eigen/' changes from 61d72f6..cf794d3
Change-Id: I9b814151b01f49af6337a8605d0c42a3a1ed4c72
git-subtree-dir: third_party/eigen
git-subtree-split: cf794d3b741a6278df169e58461f8529f43bce5d
diff --git a/cmake/EigenDetermineVSServicePack.cmake b/cmake/EigenDetermineVSServicePack.cmake
index 8e5546a..fed7819 100644
--- a/cmake/EigenDetermineVSServicePack.cmake
+++ b/cmake/EigenDetermineVSServicePack.cmake
@@ -4,7 +4,6 @@
# _DetermineVSServicePack_FastCheckVersionWithCompiler which lead to errors on some systems.
function(EigenDetermineVSServicePack _pack)
if(NOT DETERMINED_VS_SERVICE_PACK OR NOT ${_pack})
-
if(NOT DETERMINED_VS_SERVICE_PACK)
_DetermineVSServicePack_CheckVersionWithTryCompile(DETERMINED_VS_SERVICE_PACK _cl_version)
if(NOT DETERMINED_VS_SERVICE_PACK)
@@ -13,10 +12,25 @@
endif()
if(DETERMINED_VS_SERVICE_PACK)
-
if(_cl_version)
# Call helper function to determine VS version
_DetermineVSServicePackFromCompiler(_sp "${_cl_version}")
+
+ # temporary fix, until CMake catches up
+ if (NOT _sp)
+ if(${_cl_version} VERSION_EQUAL "17.00.50727.1")
+ set(_sp "vc110")
+ elseif(${_cl_version} VERSION_EQUAL "17.00.51106.1")
+ set(_sp "vc110sp1")
+ elseif(${_cl_version} VERSION_EQUAL "17.00.60315.1")
+ set(_sp "vc110sp2")
+ elseif(${_cl_version} VERSION_EQUAL "17.00.60610.1")
+ set(_sp "vc110sp3")
+ else()
+ set(_sp ${CMAKE_CXX_COMPILER_VERSION})
+ endif()
+ endif()
+
if(_sp)
set(${_pack} ${_sp} CACHE INTERNAL
"The Visual Studio Release with Service Pack")