[v0.05] Allow user to change CUDA_PATH. Add CMakeLists.txt in case I decide to change to CMake later

This commit is contained in:
Dr-Noob
2021-08-16 18:16:32 +02:00
parent 7b1018b577
commit 617228ce17
4 changed files with 70 additions and 4 deletions

17
build.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
# gpufetch build script
set -e
rm -rf build/ gpufetch
mkdir build/
cd build/
# In case you have CUDA installed but it is not detected,
# - set CMAKE_CUDA_COMPILER to your nvcc binary:
# - set CMAKE_CUDA_COMPILER_TOOLKIT_ROOT to the CUDA root dir
cmake -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc -DCMAKE_CUDA_COMPILER_TOOLKIT_ROOT=/usr/local/cuda/ ..
#cmake ..
make -j$(nproc)
cd -
ln -s build/gpufetch .