From a803ff18a963fc23ddb3dccf33ed7058af415f39 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Sat, 12 Apr 2014 20:24:05 -0700 Subject: [PATCH 1/2] Fixed a typo in cuda_basic.cu --- test/cuda_basic.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cuda_basic.cu b/test/cuda_basic.cu index aa7f7a599..4c7e96c10 100644 --- a/test/cuda_basic.cu +++ b/test/cuda_basic.cu @@ -129,7 +129,7 @@ void test_cuda_basic() CALL_SUBTEST( run_and_compare_to_cuda(prod(), nthreads, in, out) ); CALL_SUBTEST( run_and_compare_to_cuda(diagonal(), nthreads, in, out) ); - CALL_SUBTEST( run_and_compare_to_c(), nthreads, in, out) ); + CALL_SUBTEST( run_and_compare_to_cuda(diagonal(), nthreads, in, out) ); CALL_SUBTEST( run_and_compare_to_cuda(eigenvalues(), nthreads, in, out) ); CALL_SUBTEST( run_and_compare_to_cuda(eigenvalues(), nthreads, in, out) ); From 7903d3f27b275040702ce30eac8d329d6f571205 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Sat, 12 Apr 2014 23:39:37 -0700 Subject: [PATCH 2/2] Updated the compiler flags to enable nvcc to work with clang. --- test/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 62cbedae7..c2d827051 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -315,6 +315,9 @@ find_package(CUDA) if(CUDA_FOUND) set(CUDA_PROPAGATE_HOST_FLAGS OFF) + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + set(CUDA_NVCC_FLAGS "-ccbin /usr/bin/clang" CACHE STRING "nvcc flags" FORCE) + endif() cuda_include_directories(${CMAKE_CURRENT_BINARY_DIR}) set(EIGEN_ADD_TEST_FILENAME_EXTENSION "cu")