我正在尝试make
在 Nsight IDE 中,但不幸的是没有任何运气:
Building file: ../src/Cuda_Test.cu
Invoking: NVCC Compiler
/Developer/NVIDIA/CUDA-5.5/bin/nvcc -O3 -gencode arch=compute_12,code=sm_12 -odir "src" -M -o "src/Cuda_Test.d" "../src/Cuda_Test.cu"
clang: error: unsupported option '-dumpspecs'
clang: error: no input files
make: *** [src/Cuda_Test.o] Error 1
正如我在以下页面上所理解的那样:
http://blog.cryptohaze.com/2012/12/nvcc-os-x-clang-and-dumpspecs.html http://lists.freebsd.org/pipermail/freebsd-ports/2011-December/071844.html
似乎我使用了错误的 C 和 CPP 编译器,但我该如何更改这些参数?解决方法似乎对CMake
而不是有效Make
。
usr/bin/gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin12.4.0
Thread model: posix
环境:
echo $PATH
/usr/local/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Developer/NVIDIA/CUDA-5.5/bin
echo $DYLD_LIBRARY_PATH
/Developer/NVIDIA/CUDA-5.5/lib:$DYLD_LIBRARY_PATH