mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-03-31 19:00:35 +08:00
Added build name support for VC11 and its service packs.
This commit is contained in:
parent
222eedf5f3
commit
cf884a9815
@ -4,7 +4,6 @@ include(CMakeDetermineVSServicePack)
|
||||
# _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,23 @@ function(EigenDetermineVSServicePack _pack)
|
||||
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")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(_sp)
|
||||
set(${_pack} ${_sp} CACHE INTERNAL
|
||||
"The Visual Studio Release with Service Pack")
|
||||
|
@ -306,17 +306,17 @@ macro(ei_set_sitename)
|
||||
endmacro(ei_set_sitename)
|
||||
|
||||
macro(ei_get_compilerver VAR)
|
||||
if(MSVC)
|
||||
# on windows system, we use a modified CMake script
|
||||
include(EigenDetermineVSServicePack)
|
||||
EigenDetermineVSServicePack( my_service_pack )
|
||||
if(MSVC)
|
||||
# on windows system, we use a modified CMake script
|
||||
include(EigenDetermineVSServicePack)
|
||||
EigenDetermineVSServicePack( my_service_pack )
|
||||
|
||||
if( my_service_pack )
|
||||
set(${VAR} ${my_service_pack})
|
||||
if( my_service_pack )
|
||||
set(${VAR} ${my_service_pack})
|
||||
else()
|
||||
set(${VAR} "na")
|
||||
endif()
|
||||
else()
|
||||
set(${VAR} "na")
|
||||
endif()
|
||||
else()
|
||||
# on all other system we rely on ${CMAKE_CXX_COMPILER}
|
||||
# supporting a "--version" flag
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user