Mercurial > hg > orthanc
changeset 3575:1d403ecf3391
fix for DCMTK if MinGW combined with C++11
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sun, 17 Nov 2019 17:58:14 +0100 |
parents | 1fc578f9f01b |
children | 35b4d56664a6 33cfcc74d1b1 |
files | Resources/CMake/JsonCppConfiguration.cmake |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Resources/CMake/JsonCppConfiguration.cmake Sat Nov 16 17:16:18 2019 +0100 +++ b/Resources/CMake/JsonCppConfiguration.cmake Sun Nov 17 17:58:14 2019 +0100 @@ -78,9 +78,11 @@ # https://gitlab.kitware.com/third-party/jsoncpp/commit/56df2068470241f9043b676bfae415ed62a0c172 add_definitions(-DJSONCPP_DEPRECATED_STACK_LIMIT=5000) - if (CMAKE_COMPILER_IS_GNUCXX OR - "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - message("Switching to C++11 standard in gcc/clang, as version of JsonCpp is >= 1.0.0") + if (CMAKE_COMPILER_IS_GNUCXX) + message("Switching to C++11 standard in gcc, as version of JsonCpp is >= 1.0.0") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11 -Wno-deprecated-declarations") + elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + message("Switching to C++11 standard in clang, as version of JsonCpp is >= 1.0.0") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-deprecated-declarations") endif() endif()