aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Sanchez <cantonios@google.com>2021-09-24 20:15:55 -0700
committerAntonio Sanchez <cantonios@google.com>2023-07-10 15:30:41 -0700
commita605d6b996fa87c89036a18d442ddd3689cf3fdb (patch)
tree6fb2c9c4b3fe9a16e4a8c94932e7fdbd74ca43d8
parentdfcd6de20a6f9601c76be65794c611336450e750 (diff)
downloadeigen-a605d6b996fa87c89036a18d442ddd3689cf3fdb.tar.gz
Rename EIGEN_CUDA_FLAGS to EIGEN_CUDA_CXX_FLAGS
Also add a missing space for clang. (cherry picked from commit 846d34384af80b80793d32257a7f917eeece41d4)
-rw-r--r--CMakeLists.txt2
-rw-r--r--test/CMakeLists.txt4
-rw-r--r--unsupported/test/CMakeLists.txt4
3 files changed, 5 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2c5ac6512..790fcf35d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -437,7 +437,7 @@ if(EIGEN_TEST_NO_EXCEPTIONS)
message(STATUS "Disabling exceptions in tests/examples")
endif()
-set(EIGEN_CUDA_FLAGS "" CACHE STRING "Additional flags to pass to the cuda compiler.")
+set(EIGEN_CUDA_CXX_FLAGS "" CACHE STRING "Additional flags to pass to the cuda compiler.")
set(EIGEN_CUDA_COMPUTE_ARCH 30 CACHE STRING "The CUDA compute architecture(s) to target when compiling CUDA code")
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index c81ea2dd2..4aff37797 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -391,14 +391,14 @@ if(CUDA_FOUND AND EIGEN_TEST_CUDA)
foreach(GPU IN LISTS EIGEN_CUDA_COMPUTE_ARCH)
string(APPEND CMAKE_CXX_FLAGS " --cuda-gpu-arch=sm_${GPU}")
endforeach()
- string(APPEND CMAKE_CXX_FLAGS "${EIGEN_CUDA_FLAGS}")
+ string(APPEND CMAKE_CXX_FLAGS " ${EIGEN_CUDA_CXX_FLAGS}")
else()
set(CUDA_PROPAGATE_HOST_FLAGS OFF)
set(NVCC_ARCH_FLAGS)
foreach(ARCH IN LISTS EIGEN_CUDA_COMPUTE_ARCH)
string(APPEND NVCC_ARCH_FLAGS " -gencode arch=compute_${ARCH},code=sm_${ARCH}")
endforeach()
- set(CUDA_NVCC_FLAGS "--expt-relaxed-constexpr -Xcudafe \"--display_error_number\" ${NVCC_ARCH_FLAGS} ${CUDA_NVCC_FLAGS} ${EIGEN_CUDA_FLAGS}")
+ set(CUDA_NVCC_FLAGS "--expt-relaxed-constexpr -Xcudafe \"--display_error_number\" ${NVCC_ARCH_FLAGS} ${CUDA_NVCC_FLAGS} ${EIGEN_CUDA_CXX_FLAGS}")
cuda_include_directories("${CMAKE_CURRENT_BINARY_DIR}" "${CUDA_TOOLKIT_ROOT_DIR}/include")
endif()
diff --git a/unsupported/test/CMakeLists.txt b/unsupported/test/CMakeLists.txt
index f87215c8b..ab5b684e9 100644
--- a/unsupported/test/CMakeLists.txt
+++ b/unsupported/test/CMakeLists.txt
@@ -307,14 +307,14 @@ if(CUDA_FOUND AND EIGEN_TEST_CUDA)
foreach(ARCH IN LISTS EIGEN_CUDA_COMPUTE_ARCH)
string(APPEND CMAKE_CXX_FLAGS " --cuda-gpu-arch=sm_${ARCH}")
endforeach()
- string(APPEND CMAKE_CXX_FLAGS "${EIGEN_CUDA_FLAGS}")
+ string(APPEND CMAKE_CXX_FLAGS " ${EIGEN_CUDA_CXX_FLAGS}")
else()
set(CUDA_PROPAGATE_HOST_FLAGS OFF)
set(NVCC_ARCH_FLAGS)
foreach(ARCH IN LISTS EIGEN_CUDA_COMPUTE_ARCH)
string(APPEND NVCC_ARCH_FLAGS " -gencode arch=compute_${ARCH},code=sm_${ARCH}")
endforeach()
- set(CUDA_NVCC_FLAGS "--expt-relaxed-constexpr -Xcudafe \"--display_error_number\" ${NVCC_ARCH_FLAGS} ${CUDA_NVCC_FLAGS} ${EIGEN_CUDA_FLAGS}")
+ set(CUDA_NVCC_FLAGS "--expt-relaxed-constexpr -Xcudafe \"--display_error_number\" ${NVCC_ARCH_FLAGS} ${CUDA_NVCC_FLAGS} ${EIGEN_CUDA_CXX_FLAGS}")
cuda_include_directories("${CMAKE_CURRENT_BINARY_DIR}" "${CUDA_TOOLKIT_ROOT_DIR}/include")
endif()