Skip to content
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

[vcpkg-cmake] Remove cmake generator support restrictions #22626

Merged
merged 9 commits into from
Jan 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ and this is something we recommend doing whenever possible.
Otherwise, you can use `TARGET` to set the target to build.
This function defaults to not passing a target to cmake.

[`vcpkg_cmake_install()`]: vcpkg_cmake_install.md

`LOGFILE_BASE` is used to set the base of the logfile names;
by default, this is `build`, and thus the logfiles end up being something like
`build-x86-windows-dbg.log`; if you use `vcpkg_cmake_install`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ This command supplies many common arguments to CMake. To see the full list, exam
* [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake)
* [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake)
* [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake)
* [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake)
* [opencv4](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv4/portfile.cmake)

## Source
[ports/vcpkg-cmake/vcpkg\_cmake\_configure.cmake](https://github.com/Microsoft/vcpkg/blob/master/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake)
2 changes: 1 addition & 1 deletion docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ vcpkg_cmake_install(
with additional parameters to set the `TARGET` to `install`,
and to set the `LOGFILE_ROOT` to `install` as well.

[`vcpkg_cmake_build()`]: vcpkg_cmake_build.cmake
[`vcpkg_cmake_build()`]: vcpkg_cmake_build.md

## Examples:

Expand Down
2 changes: 1 addition & 1 deletion ports/vcpkg-cmake/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "vcpkg-cmake",
"version-date": "2021-12-20"
"version-date": "2022-01-19"
}
19 changes: 14 additions & 5 deletions ports/vcpkg-cmake/vcpkg_cmake_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ and this is something we recommend doing whenever possible.
Otherwise, you can use `TARGET` to set the target to build.
This function defaults to not passing a target to cmake.

[`vcpkg_cmake_install()`]: vcpkg_cmake_install.md

`LOGFILE_BASE` is used to set the base of the logfile names;
by default, this is `build`, and thus the logfiles end up being something like
`build-x86-windows-dbg.log`; if you use `vcpkg_cmake_install`,
Expand Down Expand Up @@ -46,10 +48,10 @@ function(vcpkg_cmake_build)
set(arg_LOGFILE_BASE "build")
endif()

set(build_args)
set(target_args)
set(parallel_args)
set(no_parallel_args)
set(build_args "")
set(target_args "")
set(parallel_args "")
set(no_parallel_args "")

if(Z_VCPKG_CMAKE_GENERATOR STREQUAL "Ninja")
set(build_args "-v") # verbose output
Expand All @@ -63,8 +65,15 @@ function(vcpkg_cmake_build)
set(parallel_args "/m")
elseif(Z_VCPKG_CMAKE_GENERATOR STREQUAL "NMake Makefiles")
# No options are currently added for nmake builds
elseif(Z_VCPKG_CMAKE_GENERATOR STREQUAL "Unix Makefiles")
set(build_args "VERBOSE=1")
set(parallel_args "-j${VCPKG_CONCURRENCY}")
set(no_parallel_args "")
elseif(Z_VCPKG_CMAKE_GENERATOR STREQUAL "Xcode")
list(APPEND parallel_args -jobs "${VCPKG_CONCURRENCY}")
list(APPEND no_parallel_args -jobs 1)
else()
message(FATAL_ERROR "Unrecognized GENERATOR setting from vcpkg_configure_cmake(). Valid generators are: Ninja, Visual Studio, and NMake Makefiles")
message(WARNING "Unrecognized GENERATOR setting from vcpkg_cmake_configure().")
endif()

if(DEFINED arg_TARGET)
Expand Down
2 changes: 1 addition & 1 deletion ports/vcpkg-cmake/vcpkg_cmake_configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ This command supplies many common arguments to CMake. To see the full list, exam
* [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake)
* [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake)
* [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake)
* [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake)
* [opencv4](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv4/portfile.cmake)
#]===]
if(Z_VCPKG_CMAKE_CONFIGURE_GUARD)
return()
Expand Down
2 changes: 1 addition & 1 deletion ports/vcpkg-cmake/vcpkg_cmake_install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ vcpkg_cmake_install(
with additional parameters to set the `TARGET` to `install`,
and to set the `LOGFILE_ROOT` to `install` as well.

[`vcpkg_cmake_build()`]: vcpkg_cmake_build.cmake
[`vcpkg_cmake_build()`]: vcpkg_cmake_build.md

## Examples:

Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7149,7 +7149,7 @@
"port-version": 1
},
"vcpkg-cmake": {
"baseline": "2021-12-20",
"baseline": "2022-01-19",
"port-version": 0
},
"vcpkg-cmake-config": {
Expand Down
5 changes: 5 additions & 0 deletions versions/v-/vcpkg-cmake.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b7c050fe60f91dcedef6d87a3f87584151bf8aee",
"version-date": "2022-01-19",
"port-version": 0
},
{
"git-tree": "a35eb7c761372dc64526d59fa918a13c0dfbba1b",
"version-date": "2021-12-20",
Expand Down