message: CMakeLists.txt: Check for existing -std=c++11 / c++14 flag before adding it
diff: @@ -256,15 +256,25 @@ else()
  # Enable C++11 by default if found in ROOT
  if(ROOT_HAS_CXX11 AND NOT DISABLE_CXX11)
  + # Check whether C++11 flag is already in
  + if (${CMAKE_CXX_FLAGS} MATCHES "-std=c\\+\\+11")
  + message(STATUS "C++11 already enabled")
  + else()
  message(STATUS "Enabling C++11")
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
  endif()
  + endif()
  # Enable C++14 by default if found in ROOT
  if(ROOT_HAS_CXX14 AND NOT DISABLE_CXX14)
  + # Check whether C++14 flag is already in
  + if (${CMAKE_CXX_FLAGS} MATCHES "-std=c\\+\\+14")
  + message(STATUS "C++14 already enabled")
  + else()
  message(STATUS "Enabling C++14")
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
  endif()
  + endif()
  # FTGL: prefer library from ROOT, look for both libFTGL and libftgl
  unset(LIB_FTGL)
  