...
No Format |
---|
module load cmake/3.5.0
module load cmake/3.8.2 |
Installation
No Format |
---|
tar -zxvf /tmp/cmake-3.5.0.tar.gz cd /sw/cmake/3.5.0 ./bootstrap --prefix=/sw/cmake/3.5.0 make make install |
cmake version 3.8.2
No Format |
---|
module load library/zlib/1.2.11
module load misc/openssl/1.0.2
module load misc/libarchive/3.3.1
module load library/expat/2.2.0
module load misc/bison/3.0
module load misc/flex/2.6.4
module load library/szip/2.1.1
module load mpi/openMPI/1.8.5-gcc4.9.0
module load library/hdf5/1.8.18-parallel
module load NetCDF/4.4.1.1-gnu
module load fftw/3.2.2-gnu
module load misc/curl/7.54.0
module load library/bzip2/1.0.6
module load library/lzma/4.32.7
#module load gcc/4.9.3
#module unload gcc/4.9.0
#rm -r -f cmake-3.8.2;tar -zxvf cmake-3.8.2.tar.gz ;cd cmake-3.8.2;
tar -zxvf cmake-3.8.2.tar.gz ;cd cmake-3.8.2;
#Had to remove the libarchive-devel from system. Some bad coding!
rpm -e libarchive-devel
>>>>>add the following<<<<<<<<<
ls Modules/Find*.cmake
Make sure it can find the system libraries
>>>>>>>>
vi Modules/FindBZip2.cmake
set(_BZIP2_PATHS /sw/library/bzip2/1.0.6fpic)
>>>>>>>>>>>>>>
vi Modules/FindLibLZMA.cmake
set(LIBLZMA_INCLUDE_DIR /sw/library/lzma/4.32.7/include)
set(LIBLZMA_LIBRARY /sw/library/lzma/4.32.7/lib)
>>>>>>>>>>>
vi Modules/FindLibArchive.cmake
>>>>>>>>
set(LibArchive_INCLUDE_DIR /sw/misc/libarchive/3.3.1/include)
set(LibArchive_LIBRARY /sw/misc/libarchive/3.3.1/lib)
>>>>>>>>>>
vi Modules/FindCURL.cmake
>>>>>>>>>>>>
set (CURL_INCLUDE_DIR /sw/misc/curl/7.54.0/include/curl)
set (CURL_LIBRARY /sw/misc/curl/7.54.0/lib)
>>>>>>>>>>>>>>>
vi Modules/FindEXPAT.cmake
>>>>>>>>>>
set(PC_EXPAT_INCLUDE_DIRS /sw/library/expat/2.2.0/include)
set(PC_EXPAT_LIBRARY_DIRS /sw/library/expat/2.2.0/lib)
>>>>>>>>>>>
vi Modules/FindZLIB.cmake
set(ZLIB_ROOT /sw/library/zlib/1.2.11)
>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
module list
Currently Loaded Modulefiles:
1) library/zlib/1.2.11 4) library/expat/2.2.0 7) library/szip/2.1.1 10) NetCDF/4.4.1.1-gnu 13) library/bzip2/1.0.6
2) misc/openssl/1.0.2 5) misc/bison/3.0 8) mpi/openMPI/1.8.5-gcc4.9.0 11) fftw/3.2.2-gnu 14) library/lzma/4.32.7
3) misc/libarchive/3.3.1 6) misc/flex/2.6.4 9) library/hdf5/1.8.18-parallel 12) misc/curl/7.54.0
>>>>>>>>>>>>>>>>>>
tar -zxvf cmake-3.8.2.tar.gz ;cd cmake-3.8.2;
##cp -i /sw/cmake/3.8.2/src/save/*.cmake Modules/
>>>>>add the following<<<<<<<<<
vi Modules/FindZLIB.cmake
set(ZLIB_ROOT /sw/library/zlib/1.2.11)
>>>>>>>>>>>>>>>>>>>>>>>>>>
./bootstrap --system-curl --system-expat --system-zlib --system-bzip2 --system-liblzma --system-libarchive --prefix=/sw/cmake/3.8.2 2>&1 | tee bootstrapLog.txt;
check CMakeCache.txt if all seems to be correct. e.g. search for CURL and look at the path!
gmake 2>&1 | tee gmakeLog.txt
gmake install 2>&1 | tee gmakeInstall.txt
|
Reference