[vcpkg] Clean up CMake build system#10834
Merged
strega-nil merged 1 commit intomicrosoft:masterfrom Apr 15, 2020
Merged
Conversation
BillyONeal
reviewed
Apr 15, 2020
BillyONeal
approved these changes
Apr 15, 2020
Contributor
Author
|
Thanks for the review billy! |
There are quite a few changes to the CMake build system packaged up into
one set here:
* Added `toolsrc/cmake/utilities.cmake`, which contains the following:
* `vcpkg_detect_compiler` -- get the name of the C++ compiler, as one
of {gcc, clang, msvc}
* `vcpkg_detect_standard_library` -- get the name of the standard
library we're linking to, as one of {libstdc++, libc++, msvc-stl}
* `vcpkg_detect_std_filesystem` -- figure out how to link and call
into C++17's filesystem; whether one needs to link to `stdc++fs` or
`c++fs`, and whether to use `<filesystem>` or
`<experimental/filesystem>`.
* Added a `VCPKG_WARNINGS_AS_ERRORS`, split off from
`VCPKG_DEVELOPMENT_WARNINGS`, which allows one to use the development
warnings without passing -Werror
* Rename `DEFINE_DISABLE_METRICS` to `VCPKG_DISABLE_METRICS` -- the
former will now print a deprecation message and set the latter.
* Now, print a deprecation message on `WERROR`; it doesn't do anything
since the behavior it requested is now the default.
* Pass `-std=c++17` if the compiler allows it, instead of `-std=c++1z`
* Do some code movement
* Pass `USE_STD_FILESYSTEM` if possible, instead of only on minGW
* Renamed to `VCPKG_USE_STD_FILESYSTEM`
Additionally, we now pass `/W4` in Debug mode on x86 in the Visual
Studio build system; this brings it in line with the CMake build system,
and the x64 Visual Studio build system.
And finally, we make some minor code changes to support compiling in
VCPKG_DEVELOPMENT_WARNINGS mode.
4d5d881 to
133d0b6
Compare
|
@strega-nil @BillyONeal Hi, folks! Previous commit works fine |
Contributor
Author
|
@miketimofeev that's really odd... I think I know why it's broken though, lemme fix it. I guess we should test whether it's possible to bootstrap from not-the-vcpkg directory. |
|
@strega-nil thank you! |
Jimmy-Hu
added a commit
to Jimmy-Hu/vcpkg
that referenced
this pull request
Apr 16, 2020
[vcpkg] Clean up CMake build system (microsoft#10834)
strega-nil
added a commit
to strega-nil/vcpkg
that referenced
this pull request
May 5, 2021
There are quite a few changes to the CMake build system packaged up into
one set here:
* Added `toolsrc/cmake/utilities.cmake`, which contains the following:
* `vcpkg_detect_compiler` -- get the name of the C++ compiler, as one
of {gcc, clang, msvc}
* `vcpkg_detect_standard_library` -- get the name of the standard
library we're linking to, as one of {libstdc++, libc++, msvc-stl}
* `vcpkg_detect_std_filesystem` -- figure out how to link and call
into C++17's filesystem; whether one needs to link to `stdc++fs` or
`c++fs`, and whether to use `<filesystem>` or
`<experimental/filesystem>`.
* Added a `VCPKG_WARNINGS_AS_ERRORS`, split off from
`VCPKG_DEVELOPMENT_WARNINGS`, which allows one to use the development
warnings without passing -Werror
* Rename `DEFINE_DISABLE_METRICS` to `VCPKG_DISABLE_METRICS` -- the
former will now print a deprecation message and set the latter.
* Now, print a deprecation message on `WERROR`; it doesn't do anything
since the behavior it requested is now the default.
* Pass `-std=c++17` if the compiler allows it, instead of `-std=c++1z`
* Do some code movement
* Pass `USE_STD_FILESYSTEM` if possible, instead of only on minGW
* Renamed to `VCPKG_USE_STD_FILESYSTEM`
Additionally, we now pass `/W4` in Debug mode on x86 in the Visual
Studio build system; this brings it in line with the CMake build system,
and the x64 Visual Studio build system.
And finally, we make some minor code changes to support compiling in
VCPKG_DEVELOPMENT_WARNINGS mode.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There are quite a few changes to the CMake build system packaged up into
one set here:
toolsrc/cmake/utilities.cmake, which contains the following:vcpkg_detect_compiler-- get the name of the C++ compiler, as oneof {gcc, clang, msvc}
vcpkg_detect_standard_library-- get the name of the standardlibrary we're linking to, as one of {libstdc++, libc++, msvc-stl}
vcpkg_detect_std_filesystem-- figure out how to link and callinto C++17's filesystem; whether one needs to link to
stdc++fsorc++fs, and whether to use<filesystem>or<experimental/filesystem>.VCPKG_WARNINGS_AS_ERRORS, split off fromVCPKG_DEVELOPMENT_WARNINGS, which allows one to use the developmentwarnings without passing -Werror
DEFINE_DISABLE_METRICStoVCPKG_DISABLE_METRICS-- theformer will now print a deprecation message and set the latter.
WERROR; it doesn't do anythingsince the behavior it requested is now the default.
-std=c++17if the compiler allows it, instead of-std=c++1zUSE_STD_FILESYSTEMif possible, instead of only on minGWVCPKG_USE_STD_FILESYSTEMAdditionally, we now pass
/W4in Debug mode on x86 in the VisualStudio build system; this brings it in line with the CMake build system,
and the x64 Visual Studio build system.
And finally, we make some minor code changes to support compiling in
VCPKG_DEVELOPMENT_WARNINGS mode.