-
-which_cmake_version=`cmake --version`
-which_cpack_version=`cpack --version`
-which_ctest_version=`ctest --version`
-echo "current version of cmake : $which_cmake_version"
-echo "current version of cpack : $which_cpack_version"
-echo "current version of ctest : $which_ctest_version"
-if [ "x$which_cmake_version" != "xcmake version 2.8.0" ] ; then
- if [ "x$which_cmake_version" != "xcmake version 2.8.1" ] ; then
- if [ "x$which_cmake_version" != "xcmake version 2.8.2" ] ; then
- which_cmake=`which cmake`
- which_cpack=`which cpack`
- which_ctest=`which ctest`
- wget http://www.cmake.org/files/v2.8/cmake-2.8.2.tar.gz
- if [ -e ./cmake-2.8.2.tar.gz ] ; then
- tar zxvf cmake-2.8.2.tar.gz
- cd ./cmake-2.8.2/
- cmake .
- make -j
- sudo ln -sf `pwd`/bin/cmake $which_cmake
- sudo ln -sf `pwd`/bin/cpack $which_cpack
- sudo ln -sf `pwd`/bin/ctest $which_ctest
- fi
- which_cmake_version=`cmake --version`
- which_cpack_version=`cpack --version`
- which_ctest_version=`ctest --version`
- echo "new version of cmake : $which_cmake_version"
- echo "new version of cpack : $which_cpack_version"
- echo "new version of ctest : $which_ctest_version"
- cd ..
- fi
- fi
-fi
\ No newline at end of file