Tests: fix AliasTarget building on Clang/C2
This commit is contained in:
parent
445d4d4bf4
commit
123b7e1335
|
@ -1,4 +1,5 @@
|
||||||
cmake_minimum_required(VERSION 2.8.11)
|
cmake_minimum_required(VERSION 2.8.11)
|
||||||
|
cmake_policy(SET CMP0054 NEW)
|
||||||
project(AliasTarget)
|
project(AliasTarget)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 98)
|
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")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -AA")
|
||||||
endif ()
|
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(foo SHARED empty.cpp)
|
||||||
add_library(PREFIX::Foo ALIAS foo)
|
add_library(PREFIX::Foo ALIAS foo)
|
||||||
add_library(Another::Alias ALIAS foo)
|
add_library(Another::Alias ALIAS foo)
|
||||||
|
|
Loading…
Reference in New Issue