CLion: Hide implementation file defined in CMake
Answered
My CLion project is driven by a CMakeLists.txt. For internal compilation reasons, I must compile with a file external to the project like this:
add_library(testPlugin SHARED ${sources} /externalpath/JukeboxABI.cpp)
Because of this, the CLion project looks like this:

How can I prevent CLion for showing this file in the project? Is there a way in the CMakeLists.txt to set some property for this file that would indicate it is internal?
Thanks
Please sign in to leave a comment.
Hello!
When the Project view is selected in the Project tool window, all the project items along with their dependencies (SDKs and libraries) are shown. The emphasis is on the directory structure (though the packages are also shown).
In order to hide files from the Project View, you can try creating a custom scope - https://www.jetbrains.com/help/clion/configuring-scopes-and-file-colors.html.