mirror of
https://github.com/threeal/cmake-action.git
synced 2025-06-10 11:11:25 +00:00
feat: parse and pass c-compiler
and cxx-compiler
inputs
This commit is contained in:
parent
2472524a74
commit
736fc632e9
6
main/index.mjs
generated
6
main/index.mjs
generated
@ -27247,6 +27247,12 @@ async function main() {
|
||||
const generator = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput("generator");
|
||||
if (generator)
|
||||
configureArgs.push(...["-G", generator]);
|
||||
const cCompiler = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput("c-compiler");
|
||||
if (cCompiler)
|
||||
configureArgs.push("-DCMAKE_C_COMPILER=" + cCompiler);
|
||||
const cxxCompiler = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput("cxx-compiler");
|
||||
if (cxxCompiler)
|
||||
configureArgs.push("-DCMAKE_CXX_COMPILER=" + cxxCompiler);
|
||||
await _actions_exec__WEBPACK_IMPORTED_MODULE_1__.exec("cmake", configureArgs);
|
||||
_actions_core__WEBPACK_IMPORTED_MODULE_0__.setOutput("build-dir", buildDir || "build");
|
||||
const runBuild = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getBooleanInput("run-build");
|
||||
|
@ -10,6 +10,12 @@ async function main() {
|
||||
const generator = core.getInput("generator");
|
||||
if (generator) configureArgs.push(...["-G", generator]);
|
||||
|
||||
const cCompiler = core.getInput("c-compiler");
|
||||
if (cCompiler) configureArgs.push("-DCMAKE_C_COMPILER=" + cCompiler);
|
||||
|
||||
const cxxCompiler = core.getInput("cxx-compiler");
|
||||
if (cxxCompiler) configureArgs.push("-DCMAKE_CXX_COMPILER=" + cxxCompiler);
|
||||
|
||||
await exec.exec("cmake", configureArgs);
|
||||
core.setOutput("build-dir", buildDir || "build");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user