Cannot "Mark Directory as" anything but a python namespace package in CLion 2020.3

Viewed 504

I am working with CLion and when loading a project from a valid CMakeLists file I get the warning that none of the files belong to any project target. This is annoying and I found a solution here that seems to work for most people.

In CLion, header only library: file "does not belong to any project target, code insight features might not work properly"

However when I try and mark an include directory as part of the project there is not an option. The only options is to mark it has a python namespace package. Googling for this issue didn't seem to turn anything up. Does anyone know why that option would not be there?

1 Answers

You can remove the CLion configuration in the containing folder then reopen the project.

rm -rf .idea

It did work for me.

Related