mirror of https://github.com/aminya/setup-cpp
fix: fix the quoting of CPPFLAGS and LDFLAGS for pwsh
This commit is contained in:
parent
c6a8977164
commit
a4e2df0c28
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -317,8 +317,8 @@ export async function activateLLVM(directory: string, versionGiven: string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await addEnv("LDFLAGS", `-L"${directory}/lib"`)
|
await addEnv("LDFLAGS", `-L'${directory}/lib'`)
|
||||||
await addEnv("CPPFLAGS", `-I"${directory}/include"`)
|
await addEnv("CPPFLAGS", `-I'${directory}/include'`)
|
||||||
|
|
||||||
await addEnv("CC", `${directory}/bin/clang`)
|
await addEnv("CC", `${directory}/bin/clang`)
|
||||||
await addEnv("CXX", `${directory}/bin/clang++`)
|
await addEnv("CXX", `${directory}/bin/clang++`)
|
||||||
|
|
|
@ -55,14 +55,14 @@ async function addEnvSystem(name: string, valGiven: string | undefined) {
|
||||||
case "win32": {
|
case "win32": {
|
||||||
// We do not use `execa.sync(`setx PATH "${path};%PATH%"`)` because of its character limit
|
// We do not use `execa.sync(`setx PATH "${path};%PATH%"`)` because of its character limit
|
||||||
await execPowershell(`[Environment]::SetEnvironmentVariable("${name}", "${val}", "User")`)
|
await execPowershell(`[Environment]::SetEnvironmentVariable("${name}", "${val}", "User")`)
|
||||||
info(`${name}="${val} was set in the environment."`)
|
info(`${name}="${val}" was set in the environment.`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
case "linux":
|
case "linux":
|
||||||
case "darwin": {
|
case "darwin": {
|
||||||
setupCppInProfile()
|
setupCppInProfile()
|
||||||
appendFileSync(cpprc_path, `\nexport ${name}="${val}"\n`)
|
appendFileSync(cpprc_path, `\nexport ${name}="${val}"\n`)
|
||||||
info(`${name}="${val} was added to "${cpprc_path}"`)
|
info(`${name}="${val}" was added to "${cpprc_path}`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
|
Loading…
Reference in New Issue