changeset 4843:93ef0342850e

reintroduce -std=c++11 for macOS
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 07 Dec 2021 12:54:42 +0100
parents 044573b90881
children 55e8fb8e8028
files OrthancFramework/Resources/CMake/JsonCppConfiguration.cmake
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Resources/CMake/JsonCppConfiguration.cmake	Tue Dec 07 12:34:17 2021 +0100
+++ b/OrthancFramework/Resources/CMake/JsonCppConfiguration.cmake	Tue Dec 07 12:54:42 2021 +0100
@@ -98,4 +98,10 @@
   # default value (1000), so we increase this limit
   # https://gitlab.kitware.com/third-party/jsoncpp/commit/56df2068470241f9043b676bfae415ed62a0c172
   add_definitions(-DJSONCPP_DEPRECATED_STACK_LIMIT=5000)
+
+  if (APPLE AND
+      "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+    # Explicitly adding "-std=c++11" is needed on XCode
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+  endif()
 endif()