[CMake] Question regarding CUDA support in CMake 3.8.0-rc2

Nick Henderson nick.henderson at gmail.com
Wed Mar 15 20:22:14 EDT 2017


Hello!

I am testing out the CUDA support in CMake 3.8.0-rc2.

When running `make VERBOSE=1` in the build directory, I get a warning
generated related to the GPU architecture flags for nvcc:

```
[ 80%] Linking CUDA device code
/home/nwh/git/foobar/build/exec/CMakeFiles/exec.dir/cmake_device_link.o
cd /home/nwh/git/foobar/build/exec && /usr/local/bin/cmake -E
cmake_link_script CMakeFiles/exec.dir/dlink.txt --verbose=1
/usr/local/cuda/bin/nvcc   -Xcompiler=-fPIC -shared -dlink
CMakeFiles/exec.dir/exec.cc.o -o CMakeFiles/exec.dir/cmake_device_link.o
../libfoobar.a 
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are
deprecated, and may be removed in a future release (Use
-Wno-deprecated-gpu-targets to suppress warning).
```

I don't get the warning when the executable source is being compiled because
an up-to-date architecture is specified:

```
[ 60%] Building CUDA object exec/CMakeFiles/exec.dir/exec.cc.o
cd /home/nwh/git/foobar/build/exec && /usr/local/cuda/bin/nvcc  
-I/home/nwh/git/foobar  -arch compute_30 -std=c++11 -x cu -c
/home/nwh/git/foobar/exec/exec.cc -o CMakeFiles/exec.dir/exec.cc.o
```

Link to sample project: https://github.com/nwh/foobar

Questions:

* Is this a problem?
* What is the purpose of cmake_device_link.o?

Thanks,
Nick



--
View this message in context: http://cmake.3232098.n2.nabble.com/Question-regarding-CUDA-support-in-CMake-3-8-0-rc2-tp7595171.html
Sent from the CMake mailing list archive at Nabble.com.


More information about the CMake mailing list