大佬教程收集整理的这篇文章主要介绍了macos – CUDA 5.0,CMake并在OSX 10.8.3上失败,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
打电话给cmake.似乎成功了.这是我的CMakeList.txt:
project(HelloWorld) cmake_minimum_required(VERSION 2.8) FIND_PACKAGE(CUDA) CUDA_INCLUDE_DIRECTORIES(/Developer/NVIDIA/CUDA-5.0/samples/common/inC) CUDA_ADD_EXECUTABLE(HelloWorld HelloWorld.cu)
……和输出:
-- The C compiler identification is Clang 4.2.0 -- The CXX compiler identification is Clang 4.2.0 -- check for working C compiler: /usr/bin/cc -- check for working C compiler: /usr/bin/cc -- works -- DetecTing C compiler ABI info -- DetecTing C compiler ABI info - done -- check for working CXX compiler: /usr/bin/c++ -- check for working CXX compiler: /usr/bin/c++ -- works -- DetecTing CXX compiler ABI info -- DetecTing CXX compiler ABI info - done -- Found CUDA: /Developer/NVIDIA/CUDA-5.0 (found version "5.0") -- Configuring done -- Generating done -- Build files have been written to: /Users/mennny/Documents/UNI/6_Semester/0_PMPP/1_exercises/cuda-Hello-world
[100%] Building NVCC (DevicE) object CMakeFiles/HelloWorld.dir//./HelloWorld_generated_HelloWorld.cu.o clang: error: unsupported option '-dumpspecs' clang: error: no input files CMake Error at HelloWorld_generated_HelloWorld.cu.o.cmake:206 (messagE): Error generating /Users/mennny/Documents/UNI/6_Semester/0_PMPP/1_exercises/cuda-Hello-world/CMakeFiles/HelloWorld.dir//./HelloWorld_generated_HelloWorld.cu.o make[2]: *** [CMakeFiles/HelloWorld.dir/./HelloWorld_generated_HelloWorld.cu.o] Error 1 make[1]: *** [CMakeFiles/HelloWorld.dir/all] Error 2 make: *** [all] Error 2
我搜索了显示的错误但找不到足够的答案.
尽管cmake成功了,但任何想法都会失败.
谢谢你的帮助.
if (NOT DEFINED CUDA_HOST_COMPILER AND CMAKE_C_COMPILER_ID STrequAL "Clang" AND EXISTS /usr/bin/gcC) set(CUDA_HOST_COMPILER /usr/bin/gcc CACHE FILEPATH "Host side compiler used by NVCC") message(STATUS "SetTing CMAKE_HOST_COMPILER to /usr/bin/gcc instead of ${CR_954_11845@AKE_C_COMPILER}.") endif()
如有必要,调整gcc的路径.
以上是大佬教程为你收集整理的macos – CUDA 5.0,CMake并在OSX 10.8.3上失败全部内容,希望文章能够帮你解决macos – CUDA 5.0,CMake并在OSX 10.8.3上失败所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。