-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Update IDE Folders #89153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update IDE Folders #89153
Conversation
# FOLDER | ||
# For IDEs, the Folder to put the targets into.= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe if this is only affecting IDEs, then perhaps the property's name should reflect this, i.e., IDE_FOLDER
? Unfortunately, directories are also called "folders" at least on Windows, so I see a slim chance of misunderstanding this as the path from which the external project is loaded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's already called FOLDER in https://github.com/llvm/llvm-project/blob/main/llvm/cmake/modules/AddLLVM.cmake#L2080-L2083. I would prefer to keep it consistent.
This looks like a nice improvement for folks using those generators. Even though most of these changes look straightforward, it would be a lot easier to review if this was broken up per subproject. Is there any reason that's not possible? |
+1 to this: 195 files is too many to review in a single PR really, so if we have an alternative, incremental approach, we should take that. (Also big +1 to the improvement though). |
Reviewers of #89153 suggested to break up the patch into per-subproject patches. This is the libclc part. See #89153 for the entire series and motivation. Update the folder titles for targets in the monorepository that have not seen taken care of for some time. These are the folders that targets are organized in Visual Studio and XCode (`set_property(TARGET <target> PROPERTY FOLDER "<title>")`) when using the respective CMake's IDE generator. * Ensure that every target is in a folder * Use a folder hierarchy with each LLVM subproject as a top-level folder * Use consistent folder names between subprojects * When using target-creating functions from AddLLVM.cmake, automatically deduce the folder. This reduces the number of `set_property`/`set_target_property`, but are still necessary when `add_custom_target`, `add_executable`, `add_library`, etc. are used. A LLVM_SUBPROJECT_TITLE definition is used for that in each subproject's root CMakeLists.txt.
Summary: Reviewers of #89153 suggested to break up the patch into per-subproject patches. This is the libclc part. See #89153 for the entire series and motivation. Update the folder titles for targets in the monorepository that have not seen taken care of for some time. These are the folders that targets are organized in Visual Studio and XCode (`set_property(TARGET <target> PROPERTY FOLDER "<title>")`) when using the respective CMake's IDE generator. * Ensure that every target is in a folder * Use a folder hierarchy with each LLVM subproject as a top-level folder * Use consistent folder names between subprojects * When using target-creating functions from AddLLVM.cmake, automatically deduce the folder. This reduces the number of `set_property`/`set_target_property`, but are still necessary when `add_custom_target`, `add_executable`, `add_library`, etc. are used. A LLVM_SUBPROJECT_TITLE definition is used for that in each subproject's root CMakeLists.txt. Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60250967
Update the folder titles for targets in the monorepository that have not seen taken care of for some time. These are the folders that targets are organized in Visual Studio and XCode (
set_property(TARGET <target> PROPERTY FOLDER "<title>")
) when using the respective CMake's IDE generator.set_property
/set_target_property
, but are still necessary whenadd_custom_target
,add_executable
,add_library
, etc. are used. A LLVM_SUBPROJECT_TITLE definition is used for that in each subproject's root CMakeLists.txt.Before:

After:

Visual Studio now supports CMake projects directly, but the Visual Studio solution generator still has advantages. One is that targets including entire folders can be hidden when not needed. This removes non-relevant items form code search and does not try to rebuild them. For instance, when hiding Tablegenning and Resources targets, an iterative build can be faster than using ninja. The other one is that the organization in folders is less cluttered than the CMake targets view or the startup item view1:

Footnotes
Items can be hidden from the dropdown menu, but the entire list is still flat with hundreds of executables. ↩