summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/FindBLAS.cmake2
-rw-r--r--Modules/FindCUDA/select_compute_arch.cmake34
-rw-r--r--Modules/FindLAPACK.cmake2
-rw-r--r--Source/QtDialog/QCMakeCacheView.cxx8
4 files changed, 33 insertions, 13 deletions
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index 4c569b3..60f178b 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -473,7 +473,7 @@ if(BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
set(BLAS_mkl_OS_NAME "lin")
endif()
if(DEFINED ENV{MKLROOT})
- set(BLAS_mkl_MKLROOT "$ENV{MKLROOT}")
+ file(TO_CMAKE_PATH "$ENV{MKLROOT}" BLAS_mkl_MKLROOT)
# If MKLROOT points to the subdirectory 'mkl', use the parent directory instead
# so we can better detect other relevant libraries in 'compiler' or 'tbb':
get_filename_component(BLAS_mkl_MKLROOT_LAST_DIR "${BLAS_mkl_MKLROOT}" NAME)
diff --git a/Modules/FindCUDA/select_compute_arch.cmake b/Modules/FindCUDA/select_compute_arch.cmake
index 7ddb709..c437bb1 100644
--- a/Modules/FindCUDA/select_compute_arch.cmake
+++ b/Modules/FindCUDA/select_compute_arch.cmake
@@ -5,9 +5,9 @@
# - "Auto" detects local machine GPU compute arch at runtime.
# - "Common" and "All" cover common and entire subsets of architectures
# ARCH_AND_PTX : NAME | NUM.NUM | NUM.NUM(NUM.NUM) | NUM.NUM+PTX
-# NAME: Fermi Kepler Maxwell Kepler+Tegra Kepler+Tesla Maxwell+Tegra Pascal Volta Turing
+# NAME: Fermi Kepler Maxwell Kepler+Tegra Kepler+Tesla Maxwell+Tegra Pascal Volta Turing Ampere
# NUM: Any number. Only those pairs are currently accepted by NVCC though:
-# 2.0 2.1 3.0 3.2 3.5 3.7 5.0 5.2 5.3 6.0 6.2 7.0 7.2 7.5
+# 2.0 2.1 3.0 3.2 3.5 3.7 5.0 5.2 5.3 6.0 6.2 7.0 7.2 7.5 8.0
# Returns LIST of flags to be added to CUDA_NVCC_FLAGS in ${out_variable}
# Additionally, sets ${out_variable}_readable to the resulting numeric list
# Example:
@@ -30,7 +30,12 @@ endif()
set(CUDA_KNOWN_GPU_ARCHITECTURES "Fermi" "Kepler" "Maxwell")
# This list will be used for CUDA_ARCH_NAME = Common option (enabled by default)
-set(CUDA_COMMON_GPU_ARCHITECTURES "3.0" "3.5" "5.0")
+set(CUDA_COMMON_GPU_ARCHITECTURES "3.5" "5.0")
+# 3.0 is removed in CUDA 11, see:
+# https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#deprecated-features
+if(CUDA_VERSION VERSION_LESS "11.0")
+ list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "3.0")
+endif()
if(CUDA_VERSION VERSION_LESS "7.0")
set(CUDA_LIMIT_GPU_ARCHITECTURE "5.2")
@@ -62,20 +67,32 @@ endif ()
if(CUDA_VERSION VERSION_GREATER_EQUAL "9.0")
list(APPEND CUDA_KNOWN_GPU_ARCHITECTURES "Volta")
- list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "7.0" "7.0+PTX")
- list(APPEND CUDA_ALL_GPU_ARCHITECTURES "7.0" "7.0+PTX" "7.2" "7.2+PTX")
+ list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "7.0")
+ list(APPEND CUDA_ALL_GPU_ARCHITECTURES "7.0" "7.2")
if(CUDA_VERSION VERSION_LESS "10.0")
+ list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "7.0+PTX")
set(CUDA_LIMIT_GPU_ARCHITECTURE "8.0")
endif()
endif()
if(CUDA_VERSION VERSION_GREATER_EQUAL "10.0")
list(APPEND CUDA_KNOWN_GPU_ARCHITECTURES "Turing")
- list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "7.5" "7.5+PTX")
- list(APPEND CUDA_ALL_GPU_ARCHITECTURES "7.5" "7.5+PTX")
+ list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "7.5")
+ list(APPEND CUDA_ALL_GPU_ARCHITECTURES "7.5")
if(CUDA_VERSION VERSION_LESS "11.0")
+ set(CUDA_LIMIT_GPU_ARCHITECTURE "8.0")
+ list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "7.5+PTX")
+ endif()
+endif()
+
+if(CUDA_VERSION VERSION_GREATER_EQUAL "11.0")
+ list(APPEND CUDA_KNOWN_GPU_ARCHITECTURES "Ampere")
+ list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "8.0" "8.0+PTX")
+ list(APPEND CUDA_ALL_GPU_ARCHITECTURES "8.0")
+
+ if(CUDA_VERSION VERSION_LESS "12.0")
set(CUDA_LIMIT_GPU_ARCHITECTURE "9.0")
endif()
endif()
@@ -214,6 +231,9 @@ function(CUDA_SELECT_NVCC_ARCH_FLAGS out_variable)
elseif(${arch_name} STREQUAL "Turing")
set(arch_bin 7.5)
set(arch_ptx 7.5)
+ elseif(${arch_name} STREQUAL "Ampere")
+ set(arch_bin 8.0)
+ set(arch_ptx 8.0)
else()
message(SEND_ERROR "Unknown CUDA Architecture Name ${arch_name} in CUDA_SELECT_NVCC_ARCH_FLAGS")
endif()
diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake
index e275946..31e7de6 100644
--- a/Modules/FindLAPACK.cmake
+++ b/Modules/FindLAPACK.cmake
@@ -279,7 +279,7 @@ if(BLAS_FOUND)
set(LAPACK_mkl_OS_NAME "lin")
endif()
if(DEFINED ENV{MKLROOT})
- set(LAPACK_mkl_MKLROOT "$ENV{MKLROOT}")
+ file(TO_CMAKE_PATH "$ENV{MKLROOT}" LAPACK_mkl_MKLROOT)
# If MKLROOT points to the subdirectory 'mkl', use the parent directory instead
# so we can better detect other relevant libraries in 'compiler' or 'tbb':
get_filename_component(LAPACK_mkl_MKLROOT_LAST_DIR "${LAPACK_mkl_MKLROOT}" NAME)
diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx
index 541d3e9..b1f4a82 100644
--- a/Source/QtDialog/QCMakeCacheView.cxx
+++ b/Source/QtDialog/QCMakeCacheView.cxx
@@ -220,14 +220,14 @@ void QCMakeCacheModel::setProperties(const QCMakePropertyList& props)
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
newProps = props.toSet();
#else
- newProps = QSet(props.begin(), props.end());
+ newProps = QSet<QCMakeProperty>(props.begin(), props.end());
#endif
newProps2 = newProps;
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
QSet<QCMakeProperty> oldProps = this->properties().toSet();
#else
- QSet<QCMakeProperty> oldProps =
- QSet(this->properties().begin(), this->properties().end());
+ QSet<QCMakeProperty> oldProps = QSet<QCMakeProperty>(
+ this->properties().begin(), this->properties().end());
#endif
oldProps.intersect(newProps);
newProps.subtract(oldProps);
@@ -236,7 +236,7 @@ void QCMakeCacheModel::setProperties(const QCMakePropertyList& props)
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
newProps2 = props.toSet();
#else
- newProps2 = QSet(props.begin(), props.end());
+ newProps2 = QSet<QCMakeProperty>(props.begin(), props.end());
#endif
}