On Mittwoch, 29. September 2021 19:06:37 CEST Michał Wichrowski wrote:
> Martin,
> Thank you for your answer, I tried following your instructions
...
> For deal.II itself I tried:
>
> `File`-> `New` -> `Project...`
> From `C/C++` section choose `C++ project`, click Next.
> Set a meaningful project name, uncheck `Use default location` and specify
> the location of deal.II source directory. In `Project type` select `CMake
> driven` ->`Empty project` and in `Toolchain` menu select `CMake Driven`.
> Click `Next`.
> Assuming you previously compiled deal.II inside subdirectory `build` and
> you want to use existing configuration:
> Click `Advanced Settings`, agree to override existing project settings, go
> to `C/C++ Build`-> `cmake4eclipse`, set the configuration you want to
> modify. Inside `Build Output Location` frame, set `Folder` to "build/" (or
> whenever you built deal.II).
So far, so good.
> In frame `Pre-populate CMake cache entries from file` set
> "build/CMakeCache.txt". Click `Apply and Close` and `Finish`
Don't do that! You are effectively telling cmake to load file "build/
CMakeCache.txt" which is going to be *generated* by cmake and hence does not
exist.
Simple leave the `Pre-populate CMake cache' field emty.
>
> 1) Build works! Unfortunately, it first runs "make clean" destroying
> preexisting compilation. Can I somehow disable that behaviour?
"make clean" is run by CDT itself. No idea, why and when.
> 2) #include <iostream> and other STD headers are unresolved, as a
> consequence all SDT functions are not indexed and marked as errors. I guess
> adding headers location manually would resolve that, but shouldn't it be
> managed by cmake4eclipse?
Have a look at the compile_commands.json file in the build directory. It show
the include path that cmake did detect.
You could also open a C-source file in the editor and open menu Project | C/C+
+ Index | Create Parse Log file.