* Fix Cmake generator arguments

CMake 3.20 seems to have gotten a lot more strict on the generator arguments. Properly use quotes, and also use -G not -g for generator

* Revert quotes

* Another fix test

* Only add quotes if generator has spaces

* Try lowercase ninja

* Actually fix build...

* 1 last fix

* Fix arm build
This commit is contained in:
Thad House 2021-03-30 10:33:28 -07:00 коммит произвёл GitHub
Родитель dd4f4ede0f
Коммит ede9ae650e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 10 добавлений и 7 удалений

Просмотреть файл

@ -260,7 +260,7 @@ stages:
arch: arm
tls: openssl
ubuntuVersion: 18.04
extraBuildArgs: -DisableLogs -Generator Ninja -ToolchainFile cmake/toolchains/arm-pi-gnueabihf.toolchain.cmake
extraBuildArgs: -DisableLogs -ToolchainFile cmake/toolchains/arm-pi-gnueabihf.toolchain.cmake
- template: ./templates/build-config-user.yml
parameters:
image: ubuntu-latest

Просмотреть файл

@ -208,8 +208,6 @@ if ("" -eq $Arch) {
if ($Generator -eq "") {
if ($IsWindows) {
$Generator = "Visual Studio 16 2019"
} elseif ($IsLinux) {
$Generator = "Ninja"
} else {
$Generator = "Unix Makefiles"
}
@ -297,9 +295,14 @@ function CMake-Execute([String]$Arguments) {
# Uses cmake to generate the build configuration files.
function CMake-Generate {
$Arguments = "-g"
$Arguments = "-G"
if ($Generator.Contains(" ")) {
$Generator = """$Generator"""
}
if ($IsWindows) {
$Arguments += " '$Generator' -A "
$Arguments += " $Generator -A "
switch ($Arch) {
"x86" { $Arguments += "Win32" }
"x64" { $Arguments += "x64" }
@ -307,13 +310,13 @@ function CMake-Generate {
"arm64" { $Arguments += "arm64" }
}
} elseif ($IsMacOS) {
$Arguments += " '$Generator'"
$Arguments += " $Generator"
switch ($Arch) {
"x64" { $Arguments += " -DCMAKE_OSX_ARCHITECTURES=x86_64"}
"arm64" { $Arguments += " -DCMAKE_OSX_ARCHITECTURES=arm64"}
}
} else {
$Arguments += " '$Generator'"
$Arguments += " $Generator"
}
$Arguments += " -DQUIC_TLS=" + $Tls
$Arguments += " -DQUIC_OUTPUT_DIR=" + $ArtifactsDir