Build commands for executable resources #8872
-
Hey everyone, first time user here... I got Aspire to work nicely with my .NET projects and love it. However, I also have a number of C++ services built with CMake. Now, I can use |
Beta Was this translation helpful? Give feedback.
Answered by
michaelwildvarian
Apr 20, 2025
Replies: 1 comment
-
To answer myself, something like this does it: var builder = DistributedApplication.CreateBuilder(args);
var cmakeConfigure = builder
.AddExecutable(
"CMakeConfigure",
"cmake",
"relative/path/to/dir",
"-S", ".",
"-B", "relative/path/to/other/dir",
"-G", "Ninja");
var cmakeBuild = builder
.AddExecutable(
"CMakeBuild",
"cmake",
"relatvie/path/to/dir",
"--build", "relative/path/to/other/dir",
"--target", "foo")
.WaitForCompletion(cmakeConfigure);
var foo = builder
.AddExecutable(
"foo",
"relative/path/to/other/dir/path/to/foo",
"path/to/work/dir")
.WaitForCompletion(cmakeBuild); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
michaelwildvarian
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To answer myself, something like this does it: