Gcc offload compilation options
问题 I'm trying to build the simplest OpenMP or OpenACC C++ program with GPU offload using gcc-10, CUDA 11 on Ubuntu 18.04 and this CMakeLists.txt file (or OpenMP version): cmake_minimum_required(VERSION 3.18) project(hello VERSION 0.1.0) find_package(OpenACC REQUIRED) add_executable(hello main.cpp) target_compile_options(hello PRIVATE -O3 -fopenacc -foffload=nvptx-none) target_link_libraries (hello OpenACC::OpenACC_CXX) The build fails with: [build] [100%] Linking CXX executable hello [build]