Skip to content

Instantly share code, notes, and snippets.

@pwrliang
Created April 27, 2018 15:45
Show Gist options
  • Save pwrliang/f1084cccb987097eee50b3deb5598f62 to your computer and use it in GitHub Desktop.
Save pwrliang/f1084cccb987097eee50b3deb5598f62 to your computer and use it in GitHub Desktop.
CUDA Project Compile commandline
sudo apt-get install libmpc-dev
sudo apt install gcc-multilib
wget https://ftp.gnu.org/gnu/gcc/gcc-5.4.0/gcc-5.4.0.tar.gz
tar -zxvf gcc-5.4.0.tar.gz
cd gcc-5.4.0
./configure --prefix=/opt/gcc-5.4.0 --enable-languages=c,c++
make -j 8
sudo make install
####
USING GCC in CMAKE
export CC=/opt/gcc-5.4.0/bin/gcc
export CXX=/opt/gcc-5.4.0/bin/g++
export CPATH=/opt/gcc-5.4.0/include/c++/5.4.0 #not sure, is this necessary?
##Using custom cuda tookit
cmake options: -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-9.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment