<div dir="ltr">Each target ends up being a module and won't recompile unless it's changed so I'm not actually sure what your goal is. But making three more packages instead of targets will have the effect you ask for.<div><div><br></div><div>-david <a href="https://github.com/AE9RB/SwiftGL">https://github.com/AE9RB/SwiftGL</a><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 31, 2016 at 11:22 AM, Stefan Bürk <span dir="ltr"><<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi everyone,<br>
<br>
I'm searching for a way to build only a specific Target(chain) instead of all targets in one build run.<br>
<br>
Folderstructure<br>
<br>
Sources/<br>
UtilOne/main.swift<br>
UtilTwo/main.swift<br>
UtilThree/main.swift<br>
<br>
Content of Packages.swift<br>
<br>
import PackageDescription<br>
<br>
let package = Package(<br>
name: "ProjectName",<br>
targets: [<br>
Target(<br>
name: "UtilOne",<br>
dependencies: []<br>
),<br>
Target(<br>
name: "UtilTwo",<br>
dependencies: []<br>
),<br>
Target(<br>
name: "UtilThree",<br>
dependencies: [<br>
.Target(name: "UtilOne")<br>
]<br>
)<br>
],<br>
<br>
dependencies: []<br>
)<br>
<br>
For building the project:<br>
<br>
$ swift build<br>
<br>
This will build all three targets in one run.<br>
<br>
What i need is to build a specific target, for example "UtilOne", which only builds the binary for UtilOne.<br>
<br>
Or how to build two targets instead of all threes ?<br>
<br>
Building target "UtilThree" should build UtilOne, because of the dependencies definition, but not UtilTwo.<br>
<br>
I couldnot found any documentation or way to get behind this, is there a way to get this work ?<br>
<br>
Freundliche Grüße<br>
<br>
Stefan Bürk<br>
<br>
<br>
impact.media GmbH<br>
Hirschstr. 8<br>
70173 Stuttgart<br>
<br>
Fon <a href="tel:%2B49-711-252698-00" value="+4971125269800">+49-711-252698-00</a><br>
Fax <a href="tel:%2B49-711-252698-90" value="+4971125269890">+49-711-252698-90</a><br>
<br>
<a href="mailto:stefan.buerk@impactmedia.de">stefan.buerk@impactmedia.de</a> <mailto:<a href="mailto:stefan.buerk@impactmedia.de">stefan.buerk@impactmedia.de</a>><br>
<a href="http://www.impactmedia.de" rel="noreferrer" target="_blank">http://www.impactmedia.de</a> <<a href="http://www.impactmedia.de/" rel="noreferrer" target="_blank">http://www.impactmedia.de/</a>><br>
<br>
Sitz Stuttgart, Amtsgericht Stuttgart, HRB 745476<br>
Geschäftsführer: Bernard Cagalj<br>
<br>
Die Mitteilung dieser E-Mail ist vertraulich und nur für den oben<br>
genannten Empfänger bestimmt. Wenn Sie nicht der vorgesehene<br>
Empfänger dieser E-Mail oder mit der Aushändigung an ihn betraut<br>
sind, weisen wir darauf hin, dass jede Form der Kenntnisnahme,<br>
Veröffentlichung, Vervielfältigung sowie Weitergabe des Inhalts<br>
untersagt ist. Wir bitten Sie uns in diesem Fall zu unterrichten.<br>
Vielen Dank!<br>
<br>
The information contained in this E-Mail is privileged and<br>
confidental intended only for the use of the individual or entity<br>
named above. If the reader of this message is not the intended<br>
recipient or competent to deliver it to the intended recipient,<br>
you are hereby notified that any dissemination, distribution or<br>
copying of this E-Mail is strictly prohibited. If you have<br>
received this E-Mail in error, please notify us immediately.<br>
Thank you!<br>
_______________________________________________<br>
swift-users mailing list<br>
<a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br>
</blockquote></div><br></div>