-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
cmake: option to disable install & drop curlu
target when unused
#12287
Conversation
Can you add a few words about why the new |
It is my understanding that the |
Did those targets get built for you with |
With the default configuration on this repository:
Setting
I have this repository embedded in an experimental project that uses curl as a submodule. The initial example is what I am using to lock the options I need in place before recursing into this repository’s scripts. Toggling For instance, if I wanted to include this project’s tests as part of my project testing, I would conditionally switch that variable to I added the conditional BUILD_TESTING statement around |
Your results say that |
That is a miscommunication on my end, the above settings are only with the extra guards in place.
With |
What do you mean by 'project' in this context? The reason I'm insisting is because this test:
when built, does not produce a I'm looking for an example which builds |
I see what you are saying. By ‘project’ I am referring to visual studio project files. Even if it is not referenced in the actual build, the project file is still generated. In turn, it is loaded in the visual studio solution. By default, the ALL_BUILD project will build both it and either The purpose of this patch is to add the option to toggle off the installation projects in the generated solution. With the It allows a strict filter to only generate and include the core libraries needed to build, link and use curl. |
Thanks for explaining! If I got it correctly this patch does these two things:
Would you mind updating the PR message to clarify? |
Done. Thank you for your time! |
Thank you, LGTM! |
curlu
target when unused
Before this patch `BUILD_TESTING` was used once, then initialized, then used again. This caused the `curlu` library not being built when relying on an implicit `BUILD_TESTING=ON` setting, and ending up with a link error when building the `testdeps` target. It did not cause issues when `BUILD_TESTING` was explicitly set. Move the initialization before the first use to fix it. Regression from aace27b #12287 Closes #13668
This patch makes the following changes:
CURL_DISABLE_INSTALL
- to disable 'install' targets.curlu
when the optionBUILD_TESTING
is set toOFF
- to prevent it from being loaded in Visual Studio.