<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi All,<br><div><br></div><div>We are trying to clean up our Visual Studio flow with CMake. However, we are running into an issue with Intellisense not finding header files properly if we use target_include_directories(). For instance, given the simple example below, if we add the "global" include_directories() call Intellisense will work, but if we use target_include_directories() approach, Intellisense does not work.</div><div><br></div><div># Works if we use this ...</div><div>include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)</div><div><br></div><div>add_library(foo ...)</div><div><br></div><div># Does not work using this ...</div><div>target_include_directories(foo PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)<br></div><div><br></div><div>The build is fine, just Intellisense doesn't work. We noticed in the Visual Studio project file generated for the component the include directories show up as an AdditionalIncludeDirectories in a few sections like <Midl/> and <CudaCompile> but not under <ClCommand>, for instance. I'm not sure where they should show up to affect Intellisense.</div><div><br></div><div>In short, before we try a bunch of other stuff, I'd like to know in general what the status of integration with Intellisense should be so we know what to expect. Note, we are compiling a project with CUDA source, not sure if that makes a difference, but we are seeing the behavior even for non-CUDA targets.</div><div><br></div><div>Thanks!</div><div>Dustyn</div></div></div></div>