Browse Source

Require C++14 for std::make_unique

Michael Hansen 10 years ago
parent
commit
8bbb560966
  1. 6
      Sources/Plasma/CoreLib/HeadSpin.h
  2. 2
      cmake/CompilerChecks.cmake

6
Sources/Plasma/CoreLib/HeadSpin.h

@ -120,10 +120,10 @@ typedef int32_t hsError;
#define hsFailed(r) ((hsError)(r)<hsOK)
#define hsSucceeded(r) ((hsError)(r)>=hsOK)
#if defined(HAVE_CXX14_DEPRECATED_ATTR)
# define hsDeprecated(message) [[deprecated(message)]]
#elif defined(HAVE_GCC_DEPRECATED_ATTR)
#if defined(HAVE_GCC_DEPRECATED_ATTR)
# define hsDeprecated(message) __attribute__((deprecated(message)))
#elif defined(HAVE_CXX14_DEPRECATED_ATTR)
# define hsDeprecated(message) [[deprecated(message)]]
#elif defined(_MSC_VER)
# define hsDeprecated(message) __declspec(deprecated(message))
#else

2
cmake/CompilerChecks.cmake

@ -5,7 +5,7 @@ endif()
# Require C++11
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y")
if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
endif()

Loading…
Cancel
Save