Files
CMake/Modules/Internal/CMakeCUDAArchitecturesValidate.cmake
Kitware Robot 1772622772 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 10:43:35 -05:00

20 lines
908 B
CMake

# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file LICENSE.rst or https://cmake.org/licensing for details.
function(cmake_cuda_architectures_validate lang)
if(DEFINED CMAKE_${lang}_ARCHITECTURES)
if(CMAKE_${lang}_ARCHITECTURES STREQUAL "")
message(FATAL_ERROR "CMAKE_${lang}_ARCHITECTURES must be non-empty if set.")
elseif(CMAKE_${lang}_ARCHITECTURES AND NOT CMAKE_${lang}_ARCHITECTURES MATCHES "^([0-9]+a?(-real|-virtual)?(;[0-9]+a?(-real|-virtual)?|;)*|all|all-major|native)$")
message(FATAL_ERROR
"CMAKE_${lang}_ARCHITECTURES:\n"
" ${CMAKE_${lang}_ARCHITECTURES}\n"
"is not one of the following:\n"
" * a semicolon-separated list of integers, each optionally\n"
" followed by '-real' or '-virtual'\n"
" * a special value: all, all-major, native\n"
)
endif()
endif()
endfunction()