Dear Martin,
Thanks, you were right, the 'CDT Indexer support for NVidia CUDA compilers' was not installed. This solved the problem of the 'cuda' sample project, but I am still not able to import my existing cmake projects.
I copied the 'cuda' sample and manually deleted the .project and .cpoject files and .settings folder. I created a project using this folder with File->New..->Project wizard using the "C++ project" and "CUDA C/C++ project" options. I set the "NVCC Builtins Provider" and selected "Use global provider shared between projects" but it did not work.
The differences between the sample project and the newly created one:
1) In the .settings directory I don't have "org.eclipse.cdt.managedbuilder.core.prefs" and org.eclipse.ltk.core.refactoring.prefs files, only the language.settings.xml exist. The language.settings.xml is little bit different than the sample. My version:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
<configuration id="de.marw.cmake.cdt.lsp.config.debug.756640889" name="Debug">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider-reference id="de.marw.cmake.cdt.language.settings.providers.CompileCommandsJsonParser" ref="shared-provider"/>
<provider-reference id="de.marw.cmake.cdt.language.settings.providers.BuiltinsCompileCommandsJsonParser" ref="shared-provider"/>
<provider-reference id="com.nvidia.cuda.toolchain.CUDACProvider" ref="shared-provider"/>
</extension>
</configuration>
</project>
2) The only difference in .project is that the following line was added to <natures>:
<nature>org.eclipse.cdt.core.ccnature</nature>
3) There are a lot of differences in the .cpoject file, but unfortunately I could got get a hint where to search for solution. My .cproject file:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="de.marw.cmake.cdt.lsp.config.debug.756640889">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="de.marw.cmake.cdt.lsp.config.debug.756640889" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.MachO64" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.Cygwin_PE" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="
org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="com.nvidia.cuda.toolchain.nvccErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.autotools.core.ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="de.marw.cmake.cdt.lsp.buildArtefactType.cmake" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=de.marw.cmake.cdt.lsp.buildArtefactType.cmake,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" description="" id="de.marw.cmake.cdt.lsp.config.debug.756640889" name="Debug" parent="de.marw.cmake.cdt.lsp.config.debug">
<folderInfo id="de.marw.cmake.cdt.lsp.config.debug.756640889." name="/" resourcePath="">
<toolChain id="de.marw.cmake.cdt.lsp.config.debug.toolChain.493506659" name="CMake driven" superClass="de.marw.cmake.cdt.lsp.config.debug.toolChain">
<targetPlatform id="de.marw.cmake.cdt.lsp.targetPlatform.cmake.1780142765" name="Any Platform" superClass="de.marw.cmake.cdt.lsp.targetPlatform.cmake"/>
<builder buildPath="/cudaOwn7/build/Debug" id="de.marw.cmake.cdt.lsp.builder.portable.1898439034" managedBuildOn="true" name="CMake Builder.Debug" superClass="de.marw.cmake.cdt.lsp.builder.portable"/>
<tool id="de.marw.cmake.cdt.lsp.toolchain.tool.dummy.1632927808" name="CMake driven Languages Proxy" superClass="de.marw.cmake.cdt.lsp.toolchain.tool.dummy"/>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="cudaOwn7.de.marw.cmake.cdt.lsp.projectType.1828026222" name="CMake driven" projectType="de.marw.cmake.cdt.lsp.projectType"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope"/>
</cproject>