UNPKG

setup-cpp

Version:

Install all the tools required for building and testing C++/C projects.

20 lines (16 loc) 649 B
import { error } from "console" import { notice } from "ci-log" import { addEnv } from "envosman" import which from "which" import { rcOptions } from "../cli-options.js" export async function setupAppleClang() { if (process.platform !== "darwin") { return } if (await which("clang", { nothrow: true }) !== null && await which("clang++", { nothrow: true }) !== null) { notice("Assuming clang is an Apple Clang compiler") await Promise.all([addEnv("CC", "clang", rcOptions), addEnv("CXX", "clang++", rcOptions)]) } // TODO install Apple Clang automatically error("Apple Clang automatic installation is not supported yet") }