aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/test/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-04-08 13:16:08 -0700
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-04-08 13:16:08 -0700
commit0d2a532fc3b25199af03106b6d4ade0f92a30dfc (patch)
treeed32b7f06a90d2ba5d0c0a66cabbf45fa9ce5ec4 /unsupported/test/CMakeLists.txt
parent2d072b38c134c60fb796e36466fd4e7a1888ce35 (diff)
Created the new EIGEN_TEST_CUDA_CLANG option to compile the CUDA tests using clang instead of nvcc
Diffstat (limited to 'unsupported/test/CMakeLists.txt')
-rw-r--r--unsupported/test/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/unsupported/test/CMakeLists.txt b/unsupported/test/CMakeLists.txt
index c6a92fe73..b1931d80a 100644
--- a/unsupported/test/CMakeLists.txt
+++ b/unsupported/test/CMakeLists.txt
@@ -190,6 +190,10 @@ if(CUDA_FOUND AND EIGEN_TEST_CUDA)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CUDA_NVCC_FLAGS "-ccbin /usr/bin/clang" CACHE STRING "nvcc flags" FORCE)
endif()
+ if(EIGEN_TEST_CUDA_CLANG)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 --cuda-gpu-arch=sm_${EIGEN_CUDA_COMPUTE_ARCH}")
+ endif()
+
set(CUDA_NVCC_FLAGS "-std=c++11 --relaxed-constexpr -arch compute_${EIGEN_CUDA_COMPUTE_ARCH} -Xcudafe \"--display_error_number\"")
cuda_include_directories("${CMAKE_CURRENT_BINARY_DIR}" "${CUDA_TOOLKIT_ROOT_DIR}/include")
set(EIGEN_ADD_TEST_FILENAME_EXTENSION "cu")