clion 2019.3. Back to NO WAY TO EXCLUDE directories from Indexing?
已回答
Clion 2019.3 on Mac OS 12.13 (High Sierra) DOES NOT have any option anywhere "Mark directory as..." and does NOT recognize the solution provided by adding
<excludeFolder url= ... in the iml file
as in :
<?xml version="1.0" encoding="UTF-8"?>
<module type="CPP_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/DebugScripts" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
All the advice on this page FAILS:
https://www.jetbrains.com/help/clion/controlling-source-library-and-exclude-directories.html
WTF ?
(Yeah... kinda frustrated)
请先登录再写评论。
Hi Andrew!
I can't reproduce the issue on my side. Please do the following: close your project (`File | Close Project`), on the Welcome screen choose `New Project` > `C++ Executable` > `Create`. Create a new directory in this project (right-click in the Project View > `New` > `Directory`). Is the "Mark directory as..." option available for this directory?
OK... That WORKS... (Except no way to create New dir within Clion.. Had to do it in Finder... However.. the "Mark directory as" IS present.
Went back to my other projects..... NOT PRESENT.
So.. Somehow CLion's behavior in this feature is DEPENDANT upon something that defines how a workspace configured???
Um. This is a bit of hide-and-seek game? Can I call out, "Olly olly oxen free" ?
Thanks
>Except no way to create New dir within Clion
That sounds very strange. I would suggest to reinstall CLion: uninstall CLion and delete contents of four directories (`~/Library/Application Support/CLion2019.3`, `~/Library/Preferences/CLion2019.3`, `~/Library/Caches/CLion2019.3`, `~/Library/Logs/CLion2019.3`). You can backup them beforehand and save in some other location if you need. But that's important that these directories are empty at the time of the new installation. After that please install CLion once again and don't import settings during the installation.
>Went back to my other projects..... NOT PRESENT.
On what build system are your projects based? How did you create them? How did you open them in CLion?
Followed EACH of those steps precisely... (Found I had several versions-worth of installs.. Got rid of all of them in the locations specified above, and deleted the app. Downloaded, installed freshly CLion-2019.3.5.dmg... Deleted the .idea folder in my project. Opened up my project in lion... And STILL not the
The project is kind of a custom compilation of python & in subdirs, a couple Xcode projects., and some shell scripting. Can't be more specific.... .
Anyway.. Please advise... Thanks
For now CLion supports the following formats:
Gradle (only the new Gradle C/C++ projects)
For projects of these formats the "Mark directory as ..." option should work properly.
In your case feel free to comment or upvote https://youtrack.jetbrains.com/issue/CPP-13494, https://youtrack.jetbrains.com/issue/CPP-13158. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.
No it doesn't. Have no way to exclude directory in a newly imported cmake project.
There is no such option in the menu. Only "mark as project sources" or "library files"
Constantine Peresypkin it's a regression in CLion 2021.2 - https://youtrack.jetbrains.com/issue/CPP-26013. Possible workarounds are described in the comments. The fix will be included into the 2021.2.1 update.