Code: Select all
cmake \
-DCMAKE_CUDA_ARCHITECTURES=61 \
-DCMAKE_BUILD_TYPE=Release \
-DCUDAToolkit_ROOT=/usr/local/cuda-11.6 \
-DCMAKE_CUDA_COMPILER=/usr/local/cuda-11.6/bin/nvcc \
-DCMAKE_CUDA_HOST_COMPILER=/usr/bin/g++-11 \
-S /path/to/src_dir \
-B /path/to/build_dir
Code: Select all
-- The C compiler identification is GNU 11.5.0
-- The CXX compiler identification is GNU 11.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc-11 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++-11 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The CUDA compiler identification is unknown
-- Check for working CUDA compiler: /usr/local/cuda-11.6/bin/nvcc
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
Missing variable is:
_CMAKE_CUDA_WHOLE_FLAG
CMake Error at /opt/cmake/share/cmake-4.1/Modules/CMakeTestCUDACompiler.cmake:48 (try_compile):
Failed to generate test project build system.
Call Stack (most recent call first):
examples/CMakeLists.txt:8 (enable_language)
Also, was ist los? Was bedeutet Variable? Und was muss ich tun, damit meine CMake-Konfiguration erfolgreich ist?
Mobile version