###########################################
function checkDistrib {
local OS=$1
- if [ "`checkVal $OS MacOS Fedora Ubuntu Mandriva`" == "false" ] ; then
+ if [ "`checkVal $OS MacOS Fedora Ubuntu Mandriva CentOS`" == "false" ] ; then
echo "Operating System not supported: $OS"
echo "Currently supported system: Fedora Ubuntu MacOS"
exit 1
if [ "$DISTRIB" == MacOS ] ; then OSVesion=VOID_Darwin_EED;
elif [ "$DISTRIB" == Fedora ] ; then OSVersion=`awk 'NR==1{print $3}' /etc/system-release`
elif [ "$DISTRIB" == Ubuntu ] ; then OSVersion=`awk 'NR==1{print $2}' /etc/issue`
+ elif [ "$DISTRIB" == CentOS ] ; then OSVersion=`awk 'NR==1{print $3}' /etc/issue`
else OSVersion="VOID_EED"
fi
echo $OSVersion
}
+###########################################
+function getKernelVersion {
+ local DISTRIB=`getDistrib`
+
+ if [ "$DISTRIB" == MacOS ] ; then KernelVesion=VOID_Darwin_EED;
+ elif [ "$DISTRIB" == Fedora ] ; then KernelVersion=$(uname -a | awk '{print $3}')
+ elif [ "$DISTRIB" == Ubuntu ] ; then KernelVersion=$(uname -a | awk '{print $3}')
+ elif [ "$DISTRIB" == CentOS ] ; then KernelVersion=$(uname -a | awk '{print $3}')
+ else KernelVersion="VOID_EED"
+ fi
+ echo $KernelVersion
+}
+
+
+
+
###########################################
function getDownloadCommand {
local DISTRIB=`getDistrib`
if [ "$DISTRIB" == MacOS ] ; then downloadCommand=curl;
elif [ "$DISTRIB" == Fedora ] ; then downloadCommand='aria2c -x 16'
+ elif [ "$DISTRIB" == CentOs ] ; then downloadCommand='aria2c -x 16'
elif [ "$DISTRIB" == Ubuntu ] ; then downloadCommand=wget
else downloadCommand="VOID_EED"
fi
yum install fcgi -y
yum install fcgi-devel -y
+ ;;
+ CentOS)
+ yum install aria2 -y
+ yum install wget -y
+ yum install unzip -y
+ yum install cmake -y
+ yum install cmake-gui -y
+ yum install doxygen -y
+ yum install graphviz -y
+ yum install texlive -y
+ yum install latex2html -y
+ yum install wxGTK-devel wxBase -y
+ yum install boost-devel -y
+ yum install sqlite-devel -y
+ yum install qt-devel -y
+ yum install mesa-libOSMesa-devel -y
+ yum install gcc -y
+ yum install gcc-c++ -y
+ yum install redhat-rpm-config -y
+ yum install xerces-c-devel -y
+ yum install git -y
+ yum install qtwebkit-devel -y
+ yum install patch -y
+ yum install fcgi -y
+ yum install fcgi-devel -y
+
;;
Ubuntu)
apt-get --yes install aria2
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
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
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
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
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
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 ..