CUDA compilation issue with CMake

后端 未结 3 539
灰色年华
灰色年华 2021-02-05 11:22

I am having issues with compiling my CUDA code with CMake. I am using CUDA 7 and the version information from nvcc is as follows:

nvcc: NVIDIA (R) Cuda compiler          


        
3条回答
  •  长发绾君心
    2021-02-05 11:44

    If stumbling across this question while searching for a way to compile Genoils CPP-Ethereum build for Ethereum CUDA mining, my problem was solved by editing the CMakeLists.txt file in the cpp-ethereum/libethash-cuda folder.

    Where it states:

    set(CUDA_NVCC_FLAGS
    ${CUDA_NVCC_FLAGS};
    -gencode etc etc)
    

    add "-std=c++11" after the semi-colon, as follows:

    set(CUDA_NVCC_FLAGS 
    ${CUDA_NVCC_FLAGS};
    -std=c++11
    -gencode etc etc) 
    

提交回复
热议问题