Browse Source

Tests: fix complexOneConfig building on Clang/C2

Mariusz Pluciński 10 years ago
parent
commit
1902c293ba
1 changed files with 7 additions and 0 deletions
  1. 7 0
      Tests/ComplexOneConfig/CMakeLists.txt

+ 7 - 0
Tests/ComplexOneConfig/CMakeLists.txt

@@ -2,6 +2,7 @@
 # A more complex test case
 #
 cmake_minimum_required(VERSION 2.4)
+cmake_policy(SET CMP0054 NEW)
 project (Complex)
 
 # Try setting a new policy.  The IF test is for coverage.
@@ -401,6 +402,12 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL HP AND
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -AA")
 endif ()
 
+# Clang/C2 in C++98 mode cannot properly handle some of MSVC headers
+if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
+    CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
+  set(CMAKE_CXX_STANDARD 11)
+endif()
+
 #
 # Create the libs and the main exe
 #