summaryrefslogtreecommitdiffstats
path: root/Tests/AliasTarget
diff options
context:
space:
mode:
authorMariusz PluciƄski <mplucinski@mplucinski.com>2016-02-19 00:08:33 (GMT)
committerBrad King <brad.king@kitware.com>2016-03-10 14:11:41 (GMT)
commit123b7e1335cf7a306e359e5352f082ffe7df50f7 (patch)
treecd27b66517fe01ff1b8c48d40e00ffb35ae0bcc2 /Tests/AliasTarget
parent445d4d4bf4867fb5554caede704bc99de6269038 (diff)
downloadCMake-123b7e1335cf7a306e359e5352f082ffe7df50f7.zip
CMake-123b7e1335cf7a306e359e5352f082ffe7df50f7.tar.gz
CMake-123b7e1335cf7a306e359e5352f082ffe7df50f7.tar.bz2
Tests: fix AliasTarget building on Clang/C2
Diffstat (limited to 'Tests/AliasTarget')
-rw-r--r--Tests/AliasTarget/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/AliasTarget/CMakeLists.txt b/Tests/AliasTarget/CMakeLists.txt
index e1d8966..47ccbdc 100644
--- a/Tests/AliasTarget/CMakeLists.txt
+++ b/Tests/AliasTarget/CMakeLists.txt
@@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 2.8.11)
+cmake_policy(SET CMP0054 NEW)
project(AliasTarget)
set(CMAKE_CXX_STANDARD 98)
@@ -10,6 +11,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()
+
add_library(foo SHARED empty.cpp)
add_library(PREFIX::Foo ALIAS foo)
add_library(Another::Alias ALIAS foo)