-
Notifications
You must be signed in to change notification settings - Fork 174
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
Is there anyway to speed-up "configure" step with CPM? #118
Comments
Hm I don't think it's possible for CMake to "cache" a subdirectory, as it needs to run all dependency's CMakeLists to ensure that all contained targets and functions etc are defined and in the correct order. |
Thanks, good suggestion, I'll try precompiling and use CPMFindPackage. I thought you added an option for CPMAddPackage to prefer to find_package first, is this correct? |
Yeah, you could also get this behaviour globally for |
Closing as there is nothing that CPM can really do against slow dependency configure times. |
As it turns out the largest bottleneck for us was CMake's FetchContent doing essentially nothing. Therefore the most recent release bypasses FetchContent for previously cached dependencies. For us this reduced configuration time from minutes to seconds. @bolu-atx perhaps you could try updating CPM.cmake to at least 0.28.0 and see if it reduces configuration time for your projects as well. |
Because I inherited an old project and there's a lot of dependencies, I don't really have a say in whether to include them or not.
Right now when I make any chanegs to the CMakeLists file, reconfiguring the cmake project literally takes like 5 mins to finish. This is largely because of CPM calling "configure" on a few old projects that do a lot of testing of different headers / platforms.
Would it be possible to mark a project as "CACHED" to configure it only once at the first load and just skip it in subsequent
configure
s?i.e. this is an example output I have for one such "configure" step, majority of the dependencies are never changing, so i don't think there's any need to reconfigure them
The text was updated successfully, but these errors were encountered: