Reputation: 999
I am working with Cuda C/C++ using CLion, I build and compile on a remote machine. The compilation and execution works without problems but CLion highlight in red C++ standard libraries. I can't figure out how to solve the problem, anyone can help me? thank you in advance.
Here my Cmake configuration file:
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
set(CUDACXX /usr/local/cuda-8.0/bin/nvcc)
set(CMAKE_CUDA_COMPILER /usr/local/cuda-8.0/bin/nvcc)
project(ProgettoGPU LANGUAGES C CXX CUDA)
add_executable(ProgettoGPU main.cu src/linalgebra/linalgebra.cu src/operations/sigmoid.cu src/operations/sigmoid.h src/utils/matrix.cu src/utils/matrix.h src/utils/common.h src/operations/add.cu src/operations/add.h)
target_compile_features(ProgettoGPU PUBLIC cxx_std_14)
Upvotes: 2
Views: 903
Reputation: 999
CLion doesn't work properly with *.cu files. I found out from this answer that adding an empty dummy *.ccp file inside the root directory of the project make CLion recognize the standard libraries also in the other *.cu files.
Upvotes: 2