-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [rollup:2021-07-26 1/6] PR #18783 (@strega-nil) [scripts-audit] vcpkg_copy_tools and friends * [rollup:2021-07-26 2/6] PR #18898 (@dg0yt) [vcpkg] Fix toolchain compatibility with cmake < 3.15 * [rollup:2021-07-26 3/6] PR #18980 (@strega-nil) [cmake-guidelines] Minor update, for `if()` * [rollup:2021-07-26 4/6] PR #18981 (@strega-nil) [scripts-audit] vcpkg_check_linkage * [rollup:2021-07-26 5/6] PR #19158 (@Hoikas) [vcpkg.cmake] Fix variable case. * [rollup:2021-07-26 6/6] PR #18839 [scripts-audit] z_vcpkg_get_cmake_vars Co-authored-by: nicole mazzuca <[email protected]>
- Loading branch information
1 parent
8dddc6c
commit 5304f82
Showing
30 changed files
with
603 additions
and
289 deletions.
There are no files selected for viewing
This file contains 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
31 changes: 0 additions & 31 deletions
31
docs/maintainers/internal/vcpkg_internal_get_cmake_vars.md
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# z_vcpkg_get_cmake_vars | ||
|
||
The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/). | ||
|
||
**Only for internal use in vcpkg helpers. Behavior and arguments will change without notice.** | ||
Runs a cmake configure with a dummy project to extract certain cmake variables | ||
|
||
## Usage | ||
```cmake | ||
z_vcpkg_get_cmake_vars(<out-var>) | ||
``` | ||
|
||
`z_vcpkg_get_cmake_vars(cmake_vars_file)` sets `<out-var>` to | ||
a path to a generated CMake file, with the detected `CMAKE_*` variables | ||
re-exported as `VCPKG_DETECTED_*`. | ||
|
||
## Notes | ||
Avoid usage in portfiles. | ||
|
||
All calls to `z_vcpkg_get_cmake_vars` will result in the same output file; | ||
the output file is not generated multiple times. | ||
|
||
## Examples | ||
|
||
* [vcpkg_configure_make](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_make.cmake) | ||
|
||
### Basic Usage | ||
|
||
```cmake | ||
z_vcpkg_get_cmake_vars(cmake_vars_file) | ||
include("${cmake_vars_file}") | ||
message(STATUS "detected CXX flags: ${VCPKG_DETECTED_CXX_FLAGS}") | ||
``` | ||
|
||
## Source | ||
[scripts/cmake/z\_vcpkg\_get\_cmake\_vars.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/z_vcpkg_get_cmake_vars.cmake) |
This file contains 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
31 changes: 31 additions & 0 deletions
31
docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_get_vars.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# vcpkg_cmake_get_vars | ||
|
||
The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_get_vars.md). | ||
|
||
Runs a cmake configure with a dummy project to extract certain cmake variables | ||
|
||
## Usage | ||
```cmake | ||
vcpkg_cmake_get_vars(<out-var>) | ||
``` | ||
|
||
`vcpkg_cmake_get_vars(<out-var>)` sets `<out-var>` to | ||
a path to a generated CMake file, with the detected `CMAKE_*` variables | ||
re-exported as `VCPKG_DETECTED_CMAKE_*`. | ||
|
||
## Notes | ||
Avoid usage in portfiles. | ||
|
||
All calls to `vcpkg_cmake_get_vars` will result in the same output file; | ||
the output file is not generated multiple times. | ||
|
||
### Basic Usage | ||
|
||
```cmake | ||
vcpkg_cmake_get_vars(cmake_vars_file) | ||
include("${cmake_vars_file}") | ||
message(STATUS "detected CXX flags: ${VCPKG_DETECTED_CMAKE_CXX_FLAGS}") | ||
``` | ||
|
||
## Source | ||
[ports/vcpkg-cmake/vcpkg\_cmake\_get\_vars.cmake](https://github.com/Microsoft/vcpkg/blob/master/ports/vcpkg-cmake/vcpkg_cmake_get_vars.cmake) |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.