This is same example sent in my previous mail to this ML:

CMakeLists.txt
==============
cmake_minimum_required(VERSION 2.6)
project(TestCUDA CXX)
find_package(CUDA)
cuda_add_executable(test_cuda test_cuda.cu)

test_cuda.cu
============
int main(int argc, char const *argv[]) { return 0; }


Now running on my Mac with OSX 10.9.3 I get:

[1/2] Building NVCC (Device) object 
CMakeFiles/test_cuda.dir//./test_cuda_generated_test_cuda.cu.o
FAILED: cd /tmp/cuda/CMakeFiles/test_cuda.dir && 
/Applications/CMake.app/Contents/bin/cmake -E make_directory 
/tmp/cuda/CMakeFiles/test_cuda.dir//. && 
/Applications/CMake.app/Contents/bin/cmake -D verbose:BOOL=OFF -D 
build_configuration:STRING= -D 
generated_file:STRING=/tmp/cuda/CMakeFiles/test_cuda.dir//./test_cuda_generated_test_cuda.cu.o
 -D 
generated_cubin_file:STRING=/tmp/cuda/CMakeFiles/test_cuda.dir//./test_cuda_generated_test_cuda.cu.o.cubin.txt
 -P /tmp/cuda/CMakeFiles/test_cuda.dir//test_cuda_generated_test_cuda.cu.o.cmake
nvcc warning : The 'compute_10' and 'sm_10' architectures are deprecated, and 
may be removed in a future release.
-m64: No such file or directory


There is a simple way to workaround this with:
if(APPLE)
  set(CUDA_HOST_COMPILER /usr/bin/clang)
endif()

But this seems like a bug that should be fixed in CMake itself.

Also I wonder why CUDA support needs all this complicated intermediate 
.cu.o.cmake scripts. Can we just call nvcc to get object file????

Regards,
-- 
Adam
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to