diff options
author | Hauke Heibel <hauke.heibel@gmail.com> | 2013-02-27 15:54:27 +0100 |
---|---|---|
committer | Hauke Heibel <hauke.heibel@gmail.com> | 2013-02-27 15:54:27 +0100 |
commit | c754023e72dde59e5c8fce0d74c65437c2eccdd2 (patch) | |
tree | 3cb64115335ae2c02240bcc47a9d3b6bfcd5572e /cmake/EigenDetermineVSServicePack.cmake | |
parent | 455e6e38b6986f9081b07c79e53aa9fa50ce4edd (diff) |
Fixed MSVC dashboard (Experimental/Continuous) build scripts.
Diffstat (limited to 'cmake/EigenDetermineVSServicePack.cmake')
-rw-r--r-- | cmake/EigenDetermineVSServicePack.cmake | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/cmake/EigenDetermineVSServicePack.cmake b/cmake/EigenDetermineVSServicePack.cmake new file mode 100644 index 000000000..8e5546a85 --- /dev/null +++ b/cmake/EigenDetermineVSServicePack.cmake @@ -0,0 +1,27 @@ +include(CMakeDetermineVSServicePack) + +# The code is almost identical to the CMake version. The only difference is that we remove +# _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) + _DetermineVSServicePack_CheckVersionWithTryRun(DETERMINED_VS_SERVICE_PACK _cl_version) + endif() + endif() + + if(DETERMINED_VS_SERVICE_PACK) + + if(_cl_version) + # Call helper function to determine VS version + _DetermineVSServicePackFromCompiler(_sp "${_cl_version}") + if(_sp) + set(${_pack} ${_sp} CACHE INTERNAL + "The Visual Studio Release with Service Pack") + endif() + endif() + endif() + endif() +endfunction() |