]> Creatis software - creaToolsTools.git/blobdiff - Linux/scripts/ThirdParty-install-ITK.sh
#3083 creaToolsTools Bug New Normal - Not compiling in CentOS 2.6
[creaToolsTools.git] / Linux / scripts / ThirdParty-install-ITK.sh
index e6aaafa92738b467ee4c2892ca3140894595def0..91e06a75958320ed91ead68b4dd6a283bac59dda 100644 (file)
@@ -69,6 +69,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
@@ -164,7 +175,7 @@ then
   then
      cmake -D ITKV3_COMPATIBILITY:BOOL=ON -D ITKGroup_Nonunit:BOOL=ON -D  ITKGroup_IO:BOOL=ON  -D Module_ITK-Deprecated:BOOL=ON -D Module_ITK-Review:BOOL=ON  CMakeCache.txt        
   fi
-  cmake -D CMAKE_CXX_FLAGS:STRING='-std=c++03' CMakeCache.txt
+  cmake -D CMAKE_CXX_FLAGS:STRING=-std=${stdCompiler} CMakeCache.txt
 
   #uncomment following line if you want to use the bleeding edge of GDCM2!
   #cmake -D ITK_USE_SYSTEM_GDCM:BOOL=ON CMakeCache.txt