]> Creatis software - creaToolsTools.git/blobdiff - Linux/scripts/ThirdParty-install-gdcm.sh
#3083 creaToolsTools Bug New Normal - Not compiling in CentOS 2.6
[creaToolsTools.git] / Linux / scripts / ThirdParty-install-gdcm.sh
index 3ede261d24e760b1af9338e6d12566dda32d11d6..b3aa011fc3f5a6ba3f08fe2226a249d3d5b99791 100644 (file)
 fi
 
 source $PWD/scripts/CreaTools-configure.sh
+#EED 2017-03-24
+  source $PWD/scripts/LocalFunctions.sh
+  if [ `getDistrib` == "CentOS" ] && [ `getKernelVersion` < "2.6.34" ]
+  then
+       stdCompiler=c++98
+  else
+       stdCompiler=c++03
+  fi
+
 
    echo "------"
    echo $PWD/scripts/CreaTools-configure.sh
@@ -130,7 +139,7 @@ then
   cmake -D CMAKE_BUILD_TYPE:STRING=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefixThird CMakeCache.txt
   cmake -D VTK_DIR:PATH=$VTK_DIR CMakeCache.txt
   cmake -D GDCM_VTK:BOOL=ON -D GDCM_NAME_SPACE:STRING=gdcm13 CMakeCache.txt
-  cmake -D CMAKE_CXX_FLAGS:STRING='-std=c++03' CMakeCache.txt
+  cmake -D CMAKE_CXX_FLAGS:STRING=-std=${stdCompiler} CMakeCache.txt
   make -j $corenumber
   make -j $corenumber install
   cd ..