mirror of
				https://github.com/threeal/cmake-action.git
				synced 2025-11-04 05:43:42 +00:00 
			
		
		
		
	feat: pass build-args input to the CMake build command
				
					
				
			This commit is contained in:
		
							parent
							
								
									68cba48ffe
								
							
						
					
					
						commit
						22f052e23e
					
				
							
								
								
									
										3
									
								
								main/index.mjs
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										3
									
								
								main/index.mjs
									
									
									
										generated
									
									
									
								
							@ -27247,7 +27247,8 @@ async function main() {
 | 
				
			|||||||
    _actions_core__WEBPACK_IMPORTED_MODULE_0__.setOutput("build-dir", buildDir || "build");
 | 
					    _actions_core__WEBPACK_IMPORTED_MODULE_0__.setOutput("build-dir", buildDir || "build");
 | 
				
			||||||
    const runBuild = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getBooleanInput("run-build");
 | 
					    const runBuild = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getBooleanInput("run-build");
 | 
				
			||||||
    if (runBuild) {
 | 
					    if (runBuild) {
 | 
				
			||||||
        await _actions_exec__WEBPACK_IMPORTED_MODULE_1__.exec("cmake", ["--build", buildDir || "build"]);
 | 
					        const buildArgs = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getMultilineInput("build-args");
 | 
				
			||||||
 | 
					        await _actions_exec__WEBPACK_IMPORTED_MODULE_1__.exec("cmake", ["--build", buildDir || "build", ...buildArgs]);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
main();
 | 
					main();
 | 
				
			||||||
 | 
				
			|||||||
@ -9,7 +9,8 @@ async function main() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  const runBuild = core.getBooleanInput("run-build");
 | 
					  const runBuild = core.getBooleanInput("run-build");
 | 
				
			||||||
  if (runBuild) {
 | 
					  if (runBuild) {
 | 
				
			||||||
    await exec.exec("cmake", ["--build", buildDir || "build"]);
 | 
					    const buildArgs = core.getMultilineInput("build-args");
 | 
				
			||||||
 | 
					    await exec.exec("cmake", ["--build", buildDir || "build", ...buildArgs]);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user