mirror of
https://github.com/threeal/cmake-action.git
synced 2026-02-01 19:40:49 +00:00
feat: remove redundant specification of CMake source directory (#273)
* feat: remove setting the default of `source-dir` to `.` * feat: append source dir to configure Cmake args only if specified
This commit is contained in:
8
dist/index.js
generated
vendored
8
dist/index.js
generated
vendored
@@ -27735,7 +27735,11 @@ var exec = __nccwpck_require__(4926);
|
||||
* @param inputs - The action inputs.
|
||||
*/
|
||||
async function configureProject(inputs) {
|
||||
const configureArgs = [inputs.sourceDir, "-B", inputs.buildDir];
|
||||
const configureArgs = [];
|
||||
if (inputs.sourceDir) {
|
||||
configureArgs.push(inputs.sourceDir);
|
||||
}
|
||||
configureArgs.push("-B", inputs.buildDir);
|
||||
if (inputs.generator) {
|
||||
configureArgs.push(...["-G", inputs.generator]);
|
||||
}
|
||||
@@ -27771,7 +27775,7 @@ var external_node_path_default = /*#__PURE__*/__nccwpck_require__.n(external_nod
|
||||
|
||||
|
||||
function getInputs() {
|
||||
const sourceDir = (0,core.getInput)("source-dir") || ".";
|
||||
const sourceDir = (0,core.getInput)("source-dir");
|
||||
return {
|
||||
sourceDir,
|
||||
buildDir: (0,core.getInput)("build-dir") || external_node_path_default().join(sourceDir, "build"),
|
||||
|
||||
Reference in New Issue
Block a user