]> Creatis software - creaToolsTools.git/blobdiff - Linux/scripts/ThirdParty-install-VTK.sh
#3083 creaToolsTools Bug New Normal - Not compiling in CentOS 2.6
[creaToolsTools.git] / Linux / scripts / ThirdParty-install-VTK.sh
index 1c65f683689f089531a907e7e823abeda99ba15c..c8b269ca1b5d0ecbdbc3801d3b6a059457ecce15 100644 (file)
@@ -64,6 +64,17 @@ source $PWD/scripts/CreaTools-configure.sh
    echo "------"
 
 
+#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
+
+
+
 scriptDir=$PWD
 sourcesDir=$generationdir/thirdparty_sources
 binDir=$generationdir/thirdparty_bin
@@ -175,7 +186,7 @@ then
   fi
 
   cmake -D BUILD_EXAMPLES:BOOL=OFF -D BUILD_TESTING:BOOL=OFF -D BUILD_SHARED_LIBS:BOOL=ON -D VTK_USE_QT:BOOL=ON CMakeCache.txt
-  cmake -D CMAKE_CXX_FLAGS:STRING='-std=c++03' CMakeCache.txt
+  cmake -D CMAKE_CXX_FLAGS:STRING=-std=${stdCompiler} CMakeCache.txt
 
 ##EED 2016-12-22  make -j $corenumber
   make -j $corenumber