]> Creatis software - creaToolsTools.git/blobdiff - Linux/scripts/ThirdParty-install-VTK.sh
#3117 creaToolsTools Bug New Normal - Not compiling Ubuntu 16.4.3
[creaToolsTools.git] / Linux / scripts / ThirdParty-install-VTK.sh
index 66215502b41635f2eecb17c936a7d62b4ae8801b..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,10 +186,10 @@ 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
-  make install
+  make -j $corenumber
+  make -j $corenumber install
   cd ..
 fi