<div dir="ltr">Hello,<div><br></div><div>I have an external project which I'd like to build a different way depending on the main project's build target (normal case is not to build "all").</div><div><br></div><div>e.g., I'd like </div><div>"make build-A" to invoke "cmake --build ${EXTERNAL} --target build-A"</div><div>"make build-B" to invoke "cmake --build ${EXTERNAL} --target build-B"</div><div><br></div><div>in general "make X" -> "build X" would be fine.</div><div><br></div><div>Is there a way I can do this directly?</div><div><br></div><div>Should I generate N different external projects, each with a different source directory, but the same binary directory, and explicitly set the build target in the external project build step?  Is that supposed to work?</div><div><br></div><div>Is there a better way to get what I want?</div><div><br></div><div>The reason I want to not build all is to save on build time, but build-A and build-B share quite a bit of work, so in the semi-rare case I *do* want to build all, I'd like that to need the least amount of time as well.</div><div><br></div><div>Thanks,</div><div>Eric</div><div><br></div></div>