From f148cc4314514b310badb2e8debc40180cf09bca Mon Sep 17 00:00:00 2001 From: Anton Bachin Date: Tue, 17 Nov 2015 15:17:15 -0600 Subject: [PATCH] Disabled constexpr testing on MSVC. Until recently, CMake reported VS2015 as not supporting constexpr. However, constexpr support was added in the VS2015 release, and CMake now reports accordingly. The constexpr support in VS2015 is too buggy to build Better Enums. This change disables testing on VS2015 with constexpr support, because those tests will fail. Also adapted to a change in the Cygwin path prefix in AppVeyor and fixed an issue in the Travis build with wget being unable to retrieve from www.cmake.org's new redirect to cmake.org. --- .travis.yml | 2 +- test/CMakeLists.txt | 8 ++++++++ test/Makefile | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 92ef961..b19bd55 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,7 @@ before_script: - sudo apt-get update -qq - sudo apt-get install --allow-unauthenticated $COMPILER - git clone https://github.com/CxxTest/cxxtest.git cxxtest-ro - - wget http://www.cmake.org/files/v3.2/cmake-3.2.3-Linux-x86_64.tar.gz + - curl -O https://cmake.org/files/v3.2/cmake-3.2.3-Linux-x86_64.tar.gz - tar -xzf cmake-3.2.3-Linux-x86_64.tar.gz - sudo cp -fR cmake-3.2.3-Linux-x86_64/* /usr diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 74b6350..175f925 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -22,6 +22,14 @@ else() set(SUPPORTS_RELAXED_CONSTEXPR 1) endif() +# Current versions of CMake report VS2015 as supporting constexpr. However, the +# support is too buggy to build Better Enums. Avoid trying to build constexpr +# configurations on MSVC. +if(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC) + set(SUPPORTS_CONSTEXPR 0) + set(SUPPORTS_RELAXED_CONSTEXPR 0) +endif() + list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_strong_enums ENUM_CLASS_INDEX) if(ENUM_CLASS_INDEX EQUAL -1) set(SUPPORTS_ENUM_CLASS 0) diff --git a/test/Makefile b/test/Makefile index 45437ad..468d010 100644 --- a/test/Makefile +++ b/test/Makefile @@ -36,7 +36,7 @@ define PATH_FIX sed 's!include "/!include "C:/cygwin/!g' $1 > $$$$ && mv $$$$ $1 endef SUFFIX := .exe -CXXTESTGEN := python `which cxxtestgen | sed s!/cygdrive/c!c:/!` +CXXTESTGEN := python `which cxxtestgen | sed -E 's!(/cygdrive)?/c/!c:/!'` endif