CodeBlocks: generator can include external (added library) files to the project file.
When a library is included by find_package(), and find_package() can't find a find module in CMake distribution, but when it can find a CMake config for this library in some standard installation place like ProgramFiles (on windows) - CodeBlocks project may become something like this:
It looks really awful :(.
I found that this problem was exists long ago #12110 (closed), but it was fixed only for files from CMake distribution. I know, that in the past CodeBlocks generator excluded all files outside of project root dir, but then this was changed by this commit 9072535f Yes, may be sometimes somebody need to see this files which are located outside, but also sometimes this files are not needed. They are not related to project itself, they will never be edited because they are just a part of used library, they give only problems. So, why not to add an option to disable this all?
I made a patch Sagrer/cmake@9bc7cd40, which adds a check for CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES variable, and if it exists and means true - CodeBlocks generator will not include this external files to the project.
That is how the test project looks after this patch: