Tests: fix Plugin building on Clang/C2

This commit is contained in:
Mariusz Pluciński 2016-02-21 00:24:14 +01:00 committed by Brad King
parent 1902c293ba
commit 3541af67b7
1 changed files with 7 additions and 0 deletions

View File

@ -1,4 +1,5 @@
cmake_minimum_required (VERSION 2.6) cmake_minimum_required (VERSION 2.6)
cmake_policy(SET CMP0054 NEW)
project(Plugin) project(Plugin)
# Test per-target output directory properties. # Test per-target output directory properties.
@ -34,6 +35,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()
# Create an executable that exports an API for use by plugins. # Create an executable that exports an API for use by plugins.
add_executable(example_exe src/example_exe.cxx) add_executable(example_exe src/example_exe.cxx)
set_target_properties(example_exe PROPERTIES set_target_properties(example_exe PROPERTIES