[waffle] [PATCH] cmake: update minimum required MSVC version to 2013 Update 4

Jose Fonseca jfonseca at vmware.com
Thu Feb 5 11:13:03 PST 2015


I see.  Looks good.

It's funny that

   if (${MSVC} AND ${MSVC_VERSION} LESS 1800)

used to work OK in piglit [1].  Probably by sheer luck...


Jose

[1] 
http://cgit.freedesktop.org/piglit/commit/?id=306f6ba9a22f496daefa211082cefa1c9ffcf9ab


On 05/02/15 17:18, Emil Velikov wrote:
> Currently we mix variable declarations and code, as allowed in the C99
> standard. On the other hand, MSVC 2013 prior to Update 4, seems to have
> problems with such code in some corner cases.
>
> Considering it's a free update bump the requirement, and add an explicit
> check in the build system. Latter of which shamelessly copied from piglit.
>
> v2: Do not evaluate but check the MSVC variable. (Jose)
>
> Reviewed-by: Jose Fonseca <jfonseca at vmware.com>
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> ---
>   CMakeLists.txt | 5 +++++
>   README.txt     | 2 +-
>   2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 9bbe387..96fda82 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -49,6 +49,11 @@ if(waffle_build_tests)
>       include(WaffleCMocka)
>   endif()
>
> +# Require MSVC 2013 U4
> +if (MSVC AND ${CMAKE_C_COMPILER_VERSION} VERSION_LESS 18.00.31101.0)
> +    message (FATAL_ERROR "Visual Studio 2013 Update 4 or later required")
> +endif ()
> +
>   find_package(PkgConfig)
>
>   # ------------------------------------------------------------------------------
> diff --git a/README.txt b/README.txt
> index c9ffee2..d37e109 100644
> --- a/README.txt
> +++ b/README.txt
> @@ -120,7 +120,7 @@ Download and install the latest version CMake from the official website:
>
>       https://urldefense.proofpoint.com/v2/url?u=http-3A__cmake.org_&d=AwIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=zfmBZnnVGHeYde45pMKNnVyzeaZbdIqVLprmZCM2zzE&m=RBvFLv1P_C7r-jThSfQLGV4L1h32l9KC-3mJfpjLL6g&s=SCxCJShZIl_Lg0cRH6IfNYDZB7kY-pDbjYbtJXvwODg&e=
>
> -Install Microsoft Visual Studio 2013* or later.
> +Install Microsoft Visual Studio 2013 Update 4* or later.
>   Install 'Visual C++' feature.
>
>   Download OpenGL Core API and Extension Header Files.
>



More information about the waffle mailing list