Hey,
I have a Cmake project in visual studio 2019.
CMakeLists.txt:
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
project(cmakeCudaHello)
enable_language(CUDA)
file(GLOB cuda_source_files "${CMAKE_SOURCE_DIR}/*.cu")
string(APPEND CMAKE_CUDA_FLAGS " -expt-extended-lambda --default-stream per-thread -gencode arch=compute_61,code=sm_61")
string(APPEND CMAKE_CXX_FLAGS " -std=c++14")
add_executable(cmakeCudaHello ${cuda_source_files})
So the code is compiled and run but the CUDA syntax looks like an error (intellisense):
If i’m creating a cuda project then the coloring works:
So how can I add cmake file to a VS cuda project or add the syntax coloring to a cmake project?.
I want to use cmake and I also want to get the cuda syntax coloring.
Thanks Roni!