You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
1.1 KiB

  1. include(CMakeDetermineVSServicePack)
  2. # The code is almost identical to the CMake version. The only difference is that we remove
  3. # _DetermineVSServicePack_FastCheckVersionWithCompiler which lead to errors on some systems.
  4. function(EigenDetermineVSServicePack _pack)
  5. if(NOT DETERMINED_VS_SERVICE_PACK OR NOT ${_pack})
  6. if(NOT DETERMINED_VS_SERVICE_PACK)
  7. _DetermineVSServicePack_CheckVersionWithTryCompile(DETERMINED_VS_SERVICE_PACK _cl_version)
  8. if(NOT DETERMINED_VS_SERVICE_PACK)
  9. _DetermineVSServicePack_CheckVersionWithTryRun(DETERMINED_VS_SERVICE_PACK _cl_version)
  10. endif()
  11. endif()
  12. if(DETERMINED_VS_SERVICE_PACK)
  13. if(_cl_version)
  14. # Call helper function to determine VS version
  15. _DetermineVSServicePackFromCompiler(_sp "${_cl_version}")
  16. if(_sp)
  17. set(${_pack} ${_sp} CACHE INTERNAL
  18. "The Visual Studio Release with Service Pack")
  19. endif()
  20. endif()
  21. endif()
  22. endif()
  23. endfunction()