From afdb4c2316c727b22ee75dedd6c48fa50e6d79a2 Mon Sep 17 00:00:00 2001
From: adrien matta <matta@lpccaen.in2p3.fr>
Date: Wed, 16 Jun 2021 13:38:14 +0200
Subject: [PATCH] * Fixing issue when root is compiled with c++14 or above

---
 .../CMake/NPTool_CMake_Preamble.cmake         | 48 +++++++++----------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/NPLib/ressources/CMake/NPTool_CMake_Preamble.cmake b/NPLib/ressources/CMake/NPTool_CMake_Preamble.cmake
index 71c522d50..64272ec48 100644
--- a/NPLib/ressources/CMake/NPTool_CMake_Preamble.cmake
+++ b/NPLib/ressources/CMake/NPTool_CMake_Preamble.cmake
@@ -48,27 +48,27 @@ execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
   endif()
 endif()
 
-# Adjust the compiler language flag
-set(NOCPPFLAGS true)
-if(${CMAKE_CXX_FLAGS} MATCHES ".*std=.*11")
-  set(NOCPPFLAGS false)
-elseif(${CMAKE_CXX_FLAGS} MATCHES ".*std=.*0x")
-  set(NOCPPFLAGS false) 
-endif()
-
-include(CheckCXXCompilerFlag)
-
-if(NOCPPFLAGS)
-  CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
-  if(COMPILER_SUPPORTS_CXX11 AND NOT nocpp11)
-	    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-  else()
-    CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
-  endif()
-
-  if(COMPILER_SUPPORTS_CXX0X AND NOT nocpp11)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
-  endif()
-endif()
-
-
+## Adjust the compiler language flag
+#set(NOCPPFLAGS true)
+#if(${CMAKE_CXX_FLAGS} MATCHES ".*std=.*11")
+#  set(NOCPPFLAGS false)
+#elseif(${CMAKE_CXX_FLAGS} MATCHES ".*std=.*0x")
+#  set(NOCPPFLAGS false) 
+#endif()
+#
+#include(CheckCXXCompilerFlag)
+#
+#if(NOCPPFLAGS)
+#  CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
+#  if(COMPILER_SUPPORTS_CXX11 AND NOT nocpp11)
+#	    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+#  else()
+#    CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
+#  endif()
+#
+#  if(COMPILER_SUPPORTS_CXX0X AND NOT nocpp11)
+#    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
+#  endif()
+#endif()
+#
+#
-- 
GitLab