-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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: deprecate winbuild, add migration guide from legacy build methods #15920
Conversation
Should we consider starting the process of deprecating the winbuild directory? |
IMO no but do you mean deprecate to remove or make legacy to suggest cmake in the readme? It's fast with the native tools and if more options are needed the user can choose cmake or autotools. |
Because it is an additional build system to maintain, while all the options are also available with cmake. In the 2024 survey, only 12 people said they use the winbuild system. 84 said cmake and 142 checked configure. |
CMake builds with Unity enabled should be faster than a winbuild native build. It's possible to shave more time off by disabling docs/manuals (which are not
(This is also the default if the env misses Perl.) On AppVeyor CI the configure stage is super slow with VC2015/2017 for some The configure step typically caches most of the things after the initial run, so Even with configure stage running, on AppVeyor, newer MSVC build times are |
CMake is mature enough to take over the load from winbuild builds. I'm happy to hear of issues that may remain in CMake. CMake's I made some commits fixing a few warnings when compiled with Regarding performance, VS2015 and VS2017 seem to suffer from CMake jobs with all supported MSVC versions: edit: without the ability to test these locally it's hard to day, but |
Added a deprecations message. Let me know if it's OK, or if you have any suggestion. |
I built curl this afternoon using Visual Studio and the build time for me was comparable, about 30 seconds for winbuild and CMake as long as manual and docs are disabled. I'm pretty sure I didn't use unity mode. I suspect it's a little more than 12 people using winbuild but I see the point given all the work done on cmake. For old systems that use VS2010-2013 without cmake there are still project files in projects/ even if very few people may use them. And I don't know who is using VS2008, if anyone. I suggest a deprecation notice so that users have time to prepare, for example what do you think of this notice that would require acknowledgement of deprecation in one year: diff --git a/winbuild/Makefile.vc b/winbuild/Makefile.vc
index bc20d05..079246f 100644
--- a/winbuild/Makefile.vc
+++ b/winbuild/Makefile.vc
@@ -22,6 +22,21 @@
#
#***************************************************************************
+!MESSAGE
+!MESSAGE WARNING:
+!MESSAGE
+!MESSAGE The winbuild build system is deprecated and will be removed in 2026
+!MESSAGE in favor of the CMake build system.
+!MESSAGE
+!MESSAGE Please see docs/INSTALL-CMAKE.md : "Migrating from winbuild builds"
+!MESSAGE
+!MESSAGE To use the winbuild build system you must acknowledge this warning by
+!MESSAGE setting command line option WINBUILD_ACKNOWLEDGE_DEPRECATED=yes
+!MESSAGE
+!IF "$(WINBUILD_ACKNOWLEDGE_DEPRECATED)"!="yes"
+!ERROR The user must acknowledge the deprecation warning to continue.
+!ENDIF
+
!IF "$(MODE)"=="static"
TARGET = $(LIB_NAME_STATIC)
AS_DLL = false |
Add a section to |
Made a few migration guide adjustments, added the warning/ack, I also added a section for migrating from the VC10/11/12 IDE Project files. edit: PR to drop VS2008 from CI: #15934 (I haven't found where we |
Well, I still use winbuild. |
The project file generator is left for systems too old to use cmake or they are using a recent version of cmake with an old version of Visual Studio and can't generate project files for that version. I still use it to switch back and forth between configurations. We limited it in a different thread to 2010 - 2013 because at the time I think those were the versions scheduled to be removed from CMake's project file generator. If a more recent version of Visual Studio is available it may be possible to use CMake to set the toolset to target 2010-2013. |
Ah okay, I get it. The CMake manual suggests it's also possible to build VS10, 11 and 12 It also seems possible to install an older cmake binary (to an alternative path) I think it's a matter of calling that specific Do you think that could work? FTR generator removal versions/dates: |
Also: - mention `CMAKE_BUILD_TYPE` CMake option. - document missing `SSH_PATH` winbuild option.
Right, so NMake Makefiles isn't practical. But would using an older CMake version work in your setup for example? The CI is using this method, though perhaps the question is if the IDE can be told to use a specific, older CMake? |
I'm not saying it can't be done in cmake, I'm sure it can with an old version. However the legacy project generator works for older systems without separate build tools installed like cmake. The configuration switching I find useful but to be fair that's something probably only I do since I work on the project. |
Thanks for the help, feedback and reviews to all. This is merged now. |
We recommend migrating to CMake from winbuild and Visual Studio project
files. winbuild is deprecated and will be dropped in September 2025.
CMake supports all the features and options, with new ones added
promptly. It supports out-of-tree, unity and documentation builds.
Need to ack with
WINBUILD_ACKNOWLEDGE_DEPRECATED=yes
Authored-by: Jay Satiro
CMAKE_BUILD_TYPE
option inINSTALL-CMAKE
.SSH_PATH
winbuild option.