Update cmake 3.2 from cmake 2.8

if u meet the follwoing questions, remember to run by root 


Install the project...
-- Install configuration: ""
CMake Error at cmake_install.cmake:36 (file):
  file cannot create directory: /usr/local/doc/cmake-3.3.  Maybe need
  administrative privileges.


sudo make install


then when i back to the former step, i meet the follwing problems:


CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/bin


Then, it means that we need to export the path by:
export CMAKE_ROOT=/usr/local/share/cmake-3.3


after that, check by typing:


cmake --version 


cmake version 2.8.12.2


ccmake --version (which means we just update the ccmake to 3.3.2 so we should use another way to upgrade)




because the origin package source of ubuntu only the 2.8.12.2 version of cmake 

 

sudo add-apt-repository ppa:george-edison55/cmake-3.x
sudo apt-get update
sudo apt-get install cmake


after that if u want to change the version of cmake 
export CMAKE_ROOT=/usr/share/cmake-3.2/ (system root)


then enter the former folder and run
~/libgpuarray/Build$ cmake .. -DCMAKE_BUILD_TYPE=Release 


if it still shows:


CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/share/cmake-3.2
CMake Error: Error executing cmake::LoadCache(). Aborting.




then just run:


~/libgpuarray/Build$ rm * -r 
cd /usr/local/share/
sudo mkdir cmake-3.2/
sudo cp -r /usr/share/cmake-3.2/* cmake-3.2/


back to the following:
~/libgpuarray/Build$ cmake .. -DCMAKE_BUILD_TYPE=Release 
make 
sudo make install


then done
install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/include/gpuarray/array.h
-- Installing: /usr/local/include/gpuarray/blas.h
-- Installing: /usr/local/include/gpuarray/collectives.h
-- Installing: /usr/local/include/gpuarray/buffer.h
-- Installing: /usr/local/include/gpuarray/buffer_blas.h
-- Installing: /usr/local/include/gpuarray/buffer_collectives.h
-- Installing: /usr/local/include/gpuarray/config.h
-- Installing: /usr/local/include/gpuarray/elemwise.h
-- Installing: /usr/local/include/gpuarray/error.h
-- Installing: /usr/local/include/gpuarray/extension.h
-- Installing: /usr/local/include/gpuarray/ext_cuda.h
-- Installing: /usr/local/include/gpuarray/kernel.h
-- Installing: /usr/local/include/gpuarray/types.h
-- Installing: /usr/local/include/gpuarray/util.h
-- Installing: /usr/local/lib/libgpuarray.so.0.1
-- Installing: /usr/local/lib/libgpuarray.so
-- Installing: /usr/local/lib/libgpuarray-static.a

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值