[CMake] CMakeDetermineVSServicePack.cmake

aaron.meadows at thomsonreuters.com aaron.meadows at thomsonreuters.com
Tue Jun 7 13:53:00 EDT 2011


I've reopened Issue 0011279.  CMakeDetermineVSServicePack.cmake has been broken again, this time by VS2010 switching to MSBuild.  This has caused the version string to change.  I've created a patch and uploaded it to the Issue:

 

------------------------------8ß-------------------------------------------------

 

--- CMakeDetermineVSServicePack.cmake   2011-06-06 17:40:02.955552300 -0500

+++ CMakeDetermineVSServicePackWithVS2010MSBuild.cmake  2011-06-06 17:47:04.057552300 -0500

@@ -47,7 +47,9 @@

        set(_version "vc90")

    elseif(${_cl_version} VERSION_EQUAL "15.00.30729.01")

        set(_version "vc90sp1")

-   elseif(${_cl_version} VERSION_EQUAL "16.00.30319.01")

+   elseif(${_cl_version} VERSION_EQUAL "16.00.30319.01") # Pre-release VS2010 version number

+       set(_version "vc100pre")

+   elseif(${_cl_version} VERSION_EQUAL "4.00.30319.01")  # Release version of VS2010 which uses MSBuild version number

        set(_version "vc100")

    else()

        set(_version "")

@@ -74,6 +76,13 @@

         if(DETERMINED_VS_SERVICE_PACK AND _output)

             string(REGEX MATCH "Compiler Version [0-9]+.[0-9]+.[0-9]+.[0-9]+"

                 _cl_version "${_output}")

+

+            # If the above didn't work, this may be VS 2010, which has a different output with MSBuild

+            if(NOT _cl_version)

+                string(REGEX MATCH "Build Engine Version [0-9]+.[0-9]+.[0-9]+.[0-9]+"

+                    _cl_version "${_output}")

+            endif()

+

             if(_cl_version)

                 string(REGEX MATCHALL "[0-9]+"

                     _cl_version_list "${_cl_version}")

 

 

 

Aaron Meadows
Software Engineer

Thomson Reuters

Phone: 314.468.3530
Mobile: 636.541.6139
aaron.meadows at thomsonreuters.com
thomsonreuters.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110607/0990a123/attachment-0001.htm>


More information about the CMake mailing list