зеркало из https://github.com/microsoft/msquic.git
Fix Cmake generator arguments (#1405)
* 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:
Родитель
dd4f4ede0f
Коммит
ede9ae650e
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче