Salome HOME
Merge branch 'master' of ssh://git.salome-platform.org/modules/med
authorabn <adrien.bruneton@cea.fr>
Mon, 2 Nov 2015 12:01:36 +0000 (13:01 +0100)
committerabn <adrien.bruneton@cea.fr>
Mon, 2 Nov 2015 12:01:36 +0000 (13:01 +0100)
adm_local_without_kernel/cmake_files/SalomeSetupPlatform.cmake
src/MEDCoupling/MEDCouplingFieldDouble.hxx
src/MEDLoader/MEDFileMeshLL.cxx

index 1548daeafc20c5b924a6b0f81c2a0171ee73e550..6d8fbf1d2bd6a7357f2ec08ec3f4251b7efa0115 100755 (executable)
@@ -165,3 +165,17 @@ IF(NOT WIN32)
     SET(CMAKE_C_FLAGS    "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage")
   ENDIF()
 ENDIF()
+
+# C++11 support
+INCLUDE(CheckCXXCompilerFlag)
+CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
+CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
+IF(COMPILER_SUPPORTS_CXX11)
+    MESSAGE(STATUS "Enable C++11 support")
+    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ELSEIF(COMPILER_SUPPORTS_CXX0X)
+    MESSAGE(STATUS "Enable C++0x support")
+    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
+ELSE()
+    MESSAGE(WARNING "Compiler ${CMAKE_CXX_COMPILER} has no C++11 support.")
+ENDIF()
index ee9a2506a23b3116e415a4aab445af33872b3e41..065718a65e70cf79cf80cdb5b3ae4b96851c9f3b 100644 (file)
@@ -197,12 +197,13 @@ namespace ParaMEDMEM
     MEDCOUPLING_EXPORT const MEDCouplingTimeDiscretization *getTimeDiscretizationUnderGround() const { return _time_discr; }
     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *getTimeDiscretizationUnderGround() { return _time_discr; }
     MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
+  protected:
+    ~MEDCouplingFieldDouble();
   private:
     MEDCouplingFieldDouble(TypeOfField type, TypeOfTimeDiscretization td);
     MEDCouplingFieldDouble(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td);
     MEDCouplingFieldDouble(const MEDCouplingFieldDouble& other, bool deepCopy);
     MEDCouplingFieldDouble(NatureOfField n, MEDCouplingTimeDiscretization *td, MEDCouplingFieldDiscretization *type);
-    ~MEDCouplingFieldDouble();
   private:
     MEDCouplingTimeDiscretization *_time_discr;
   };
index 218f7bb724c2c05df6dc657583f41f7ff3e31b3b..cf6177bebd19549aab5fe0654c51dfa18426def3 100644 (file)
@@ -128,7 +128,7 @@ double MEDFileMeshL2::CheckMeshTimeStep(med_idt fid, const std::string& mName, i
   for(int i=0;i<nstep;i++)
     {
       MEDFILESAFECALLERRD0(MEDmeshComputationStepInfo,(fid,mName.c_str(),i+1,&numdt,&numit,&dtt));
-      p[i]=std::make_pair<int,int>(numdt,numit);
+      p[i]=std::make_pair(numdt,numit);
       found=(numdt==dt) && (numit==numit);
     }
   if(!found)