Cuda Clang and OS X Mavericks

后端 未结 6 1148
遇见更好的自我
遇见更好的自我 2020-11-29 09:37

I\'m currently trying to build a Cuda project with Cmake on MacOS 10.9. My C and C++ compiler are gcc, but it seems that since Mavericks gcc and g++ links to clang, which is

6条回答
  •  甜味超标
    2020-11-29 10:30

    This is an extension of the answer provided by Eugene:

    The CUDA toolkit download for Mac OSX 10.9 has been posted to the CUDA download page

    It supports XCode 5 on 10.9, and will automatically use clang instead of gcc, FYI.

    IF you are using XCode 5 on 10.8, please see the release notes:

    · On Mac OS X 10.8, if you install XCode 5, including the command-line tools, the gcc compiler will get replaced with clang. You can continue to successfully compile with nvcc from the command-line by using the --ccbin /usr/bin/clang option, which instructs nvcc to use the clang compiler instead of gcc to compile any host code passed to it. However, this solution will not work when building with NSight Eclipse Edition. An alternative solution that will work from the command-line and with NSight Eclipse Edition is to download an older version of the command-line tools package from the Apple Developer website after installing XCode 5, which will re-install gcc to /usr/bin. In order to do this, go to

    http://developer.apple.com/downloads/index.action

    sign in with your Apple ID, and search for command-line tools using the search pane on the left side of the screen.

提交回复
热议问题