File: windows-lib.ps1

package info (click to toggle)
tango 10.0.2%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 89,936 kB
  • sloc: cpp: 201,786; sh: 1,645; python: 953; java: 800; perl: 467; javascript: 447; xml: 325; makefile: 272; sql: 72; ruby: 24
file content (38 lines) | stat: -rw-r--r-- 814 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# From https://stackoverflow.com/questions/47032005
function Invoke-NativeCommand() {
    if ($args.Count -eq 0) {
        throw "No arguments."
    }

    $command = $args[0]
    $commandArgs = @()

    if ($args.Count -gt 1) {
        $commandArgs = $args[1..($args.Count - 1)]
    }

    & $command $commandArgs
    $result = $LASTEXITCODE

    if ($result -ne 0) {
        throw "`"$command $commandArgs`" exited with exit code $result."
    }
}

if ($LIBRARY_TYPE -eq "Shared") {
    $BUILD_SHARED_LIBS = "ON"
} else {
    $BUILD_SHARED_LIBS = "OFF"
}

if ($TELEMETRY_USAGE -eq "With Otel") {
    $TANGO_USE_TELEMETRY = "ON"
} else {
    $TANGO_USE_TELEMETRY = "OFF"
}

if ($DEPENDENCY_LOCATION -eq "Installed Deps") {
    $TANGO_INSTALL_DEPENDENCIES = "ON"
} else {
    $TANGO_INSTALL_DEPENDENCIES = "OFF"
}