summaryrefslogtreecommitdiffstats
path: root/Tests/Complex
diff options
context:
space:
mode:
authorMariusz Pluciński <mplucinski@mplucinski.com>2016-02-19 23:34:51 (GMT)
committerBrad King <brad.king@kitware.com>2016-03-10 14:11:41 (GMT)
commitcab2ec111b68a606e27c2a8c1cecf75d37d0aaf6 (patch)
tree22f9f9ef0ea422883484aacdc9174004ba14529e /Tests/Complex
parentada3736c786a058cd0b01beb294ac06017098946 (diff)
downloadCMake-cab2ec111b68a606e27c2a8c1cecf75d37d0aaf6.zip
CMake-cab2ec111b68a606e27c2a8c1cecf75d37d0aaf6.tar.gz
CMake-cab2ec111b68a606e27c2a8c1cecf75d37d0aaf6.tar.bz2
Tests: fix Complex building on Clang/C2
Diffstat (limited to 'Tests/Complex')
-rw-r--r--Tests/Complex/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index 9251ff3..83ca7f4 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/Tests/Complex/CMakeLists.txt
@@ -2,6 +2,7 @@
# A more complex test case
#
cmake_minimum_required(VERSION 2.4)
+cmake_policy(SET CMP0054 NEW)
project (Complex)
# Test that renaming a built-in works when configured multiple times.
@@ -438,6 +439,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
#