$ cmake . -DCMAKE_C_COMPILER=nvcc -DCMAKE_CXX_COMPILER=nvc++ -DCMAKE_C_FLAGS="-acc=gpu -Minfo=acc -mcmodel=medium -tp=haswell -Minline -cuda -gpu=cuda11.0,cc70" -DCMAKE_CXX_FLAGS="-acc=gpu -Minfo=acc -mcmodel=medium -tp=haswell -Minline -cuda -gpu=cuda11.0,cc70" -DCMAKE_CXX_STANDARD=17 -DACC=ON -DCUDA=ON CMake Warning (dev) at /usr/share/cmake-3.13/Modules/CMakeDetermineCompilerId.cmake:56 (if): Policy CMP0054 is not set: Only interpret if() arguments as variables or keywords when unquoted. Run "cmake --help-policy CMP0054" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Quoted variables like "CUDA" will no longer be dereferenced when the policy is set to NEW. Since the policy is not set the OLD behavior will be used. Call Stack (most recent call first): /usr/share/cmake-3.13/Modules/CMakeDetermineCCompiler.cmake:112 (CMAKE_DETERMINE_COMPILER_ID) CMakeLists.txt:1 (project) This warning is for project developers. Use -Wno-dev to suppress it. -- The C compiler identification is GNU 7.4.0 -- The CXX compiler identification is PGI 20.7.0 -- Check for working C compiler: /opt/nvidia/hpc_sdk/Linux_x86_64/20.7/compilers/bin/nvcc -- Check for working C compiler: /opt/nvidia/hpc_sdk/Linux_x86_64/20.7/compilers/bin/nvcc -- broken CMake Error at /usr/share/cmake-3.13/Modules/CMakeTestCCompiler.cmake:52 (message): The C compiler "/opt/nvidia/hpc_sdk/Linux_x86_64/20.7/compilers/bin/nvcc" is not able to compile a simple test program. It fails with the following output: Change Dir: /data/70-gaa/Desktop/CURRENT_WORK/LAST_TRY/CMakeFiles/CMakeTmp Run Build Command:"/usr/bin/make" "cmTC_db1fc/fast" /usr/bin/make -f CMakeFiles/cmTC_db1fc.dir/build.make CMakeFiles/cmTC_db1fc.dir/build make[1]: Entering directory '/data/70-gaa/Desktop/CURRENT_WORK/LAST_TRY/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_db1fc.dir/testCCompiler.c.o /opt/nvidia/hpc_sdk/Linux_x86_64/20.7/compilers/bin/nvcc -acc=gpu -Minfo=acc -mcmodel=medium -tp=haswell -Minline -cuda -gpu=cuda11.0,cc70 -o CMakeFiles/cmTC_db1fc.dir/testCCompiler.c.o -c /data/70-gaa/Desktop/CURRENT_WORK/LAST_TRY/CMakeFiles/CMakeTmp/testCCompiler.c nvcc fatal : 'cmodel=medium': expected a number make[1]: *** [CMakeFiles/cmTC_db1fc.dir/build.make:66: CMakeFiles/cmTC_db1fc.dir/testCCompiler.c.o] Error 1 make[1]: Leaving directory '/data/70-gaa/Desktop/CURRENT_WORK/LAST_TRY/CMakeFiles/CMakeTmp' make: *** [Makefile:121: cmTC_db1fc/fast] Error 2 CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:1 (project) -- Configuring incomplete, errors occurred! See also "/data/70-gaa/Desktop/CURRENT_WORK/LAST_TRY/CMakeFiles/CMakeOutput.log". See also "/data/70-gaa/Desktop/CURRENT_WORK/LAST_TRY/CMakeFiles/CMakeError.log". nvc++ 20.7-0 LLVM 64-bit target on x86-64 Linux -tp knl NVIDIA Compilers and Tools Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. g++ (Debian 7.4.0-6) 7.4.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. NVIDIA-SMI 455.23.05 Driver Version: 455.23.05 CUDA Version: 11.1 cmake . -DCMAKE_C_COMPILER=nvcc -DCMAKE_CXX_COMPILER=nvc++ -DCMAKE_C_FLAGS="-acc=gpu -Minfo=acc -mcmodel=medium -tp=haswell -Minline -cuda -gpu=cuda11.0,cc70" -DCMAKE_CXX_FLAGS="-acc=gpu -Minfo=acc -mcmodel=medium -tp=haswell -Minline -cuda -gpu=cuda11.0,cc70" -DCMAKE_CXX_STANDARD=17 -DACC=ON -DCUDA=ON