<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div>How can I avoid a custom target to be rebuild everytime I build my solution? I added my target like this:</div>
<div> </div>
<div>add_custom_target(CopyNugetPackages</div>
<div>    DEPENDS ${depends_list}</div>
<div>    COMMENT "======== copying nuget packages ========"</div>
<div>    VERBATIM</div>
<div>    )</div>
<div>set_target_properties(CopyNugetPackages PROPERTIES</div>
<div>    EXCLUDE_FROM_ALL TRUE</div>
<div>    FOLDER "CMakePredefinedTargets")</div>
<div> </div>
<div>The variable “depends_list” contains a list of custom_command outputs (essentially .dll files which are copied). All the custom commands are actually only executed once, but the custom target “CopyNugetPackages” is run over and over again.</div>
<div> </div>
<div>I would like to run “CopyNugetPackages” only as a dependency from other targets:</div>
<div> </div>
<div>add_dependencies(${target} CopyNugetPackages)</div>
<div> </div>
<div>So “CopyNugetPackages” should only be built if ${target} is built. How can I do this or is it impossible?</div>
<div> </div>
<div> </div>
<div><font face="Consolas" size="2"><span style="font-size:10.5pt;">Best Regards</span></font></div>
<div><font face="Consolas" size="2"><span style="font-size:10.5pt;"> </span></font></div>
<div><font face="Consolas" size="2"><span style="font-size:10.5pt;">Michael Stürmer</span></font></div>
<div><font face="Consolas" size="2"><span style="font-size:10.5pt;">SP/HZA-ZSEP</span></font></div>
<div><font face="Consolas" size="2"><span style="font-size:10.5pt;">Postcode HZA 13-4-06</span></font></div>
<div><font face="Consolas" size="2"><span style="font-size:10.5pt;">SZ.Prozessdatenverarbeitung</span></font></div>
<div><font face="Consolas" size="2"><span style="font-size:10.5pt;"> </span></font></div>
<div><font face="Consolas" size="2"><span style="font-size:10.5pt;">Schaeffler Technologies AG & Co. KG</span></font></div>
<div><font face="Consolas" size="2"><span style="font-size:10.5pt;">Industriestraße 1-3</span></font></div>
<div><font face="Consolas" size="2"><span style="font-size:10.5pt;">91074 Herzogenaurach (Germany)</span></font></div>
<div><font face="Consolas" size="2"><span style="font-size:10.5pt;">Tel. +49  91 32 / 82 - 86350  ·  Fax +49 91 32 / 82 - 45 86350</span></font></div>
<div><font face="Consolas" size="2"><span style="font-size:10.5pt;">Mobil.: +49 171 6860010</span></font></div>
<div><a href="mailto:stefan.soutschek@schaeffler.com"><font face="Consolas" size="2" color="#0563C1"><span style="font-size:10.5pt;"><u>mailto:michael.stuermer@schaeffler.com</u></span></font></a><font size="2"><span style="font-size:10.5pt;"> </span></font><font face="Consolas" size="2"><span style="font-size:10.5pt;">
·  </span></font><a href="http://www.ina.de/"><font face="Consolas" size="2" color="#0563C1"><span style="font-size:10.5pt;"><u>http://www.ina.de</u></span></font></a></div>
<div> </div>
<div><font face="Consolas" size="2"><span style="font-size:10.5pt;">Registered Seat: Herzogenaurach</span></font></div>
<div><font face="Consolas" size="2"><span style="font-size:10.5pt;">Commercial Register: AG Fürth HRA 9349</span></font></div>
<div><font face="Consolas" size="2"><span style="font-size:10.5pt;"> </span></font></div>
<div><font face="Consolas" size="2"><span style="font-size:10.5pt;">General Partner: INA Beteiligungsgesellschaft mit beschränkter Haftung Registered Seat: Herzogenaurach (Germany)</span></font></div>
<div><font face="Consolas" size="2"><span style="font-size:10.5pt;">Commercial Register: AG Fürth HRB 2379   </span></font></div>
<div><font face="Consolas" size="2"><span style="font-size:10.5pt;"> </span></font></div>
<div><font face="Consolas" size="2"><span style="font-size:10.5pt;">Managing Directors: </span></font></div>
<div><font face="Consolas" size="2"><span style="font-size:10.5pt;">Klaus Rosenfeld (CEO), Prof. Dr. Peter Gutzmer, Norbert Indlekofer, Oliver Jung, Kurt Mirlach, Prof. Dr. Peter Pleus, Robert Schullan</span></font></div>
<div><font face="Consolas" size="2"><span style="font-size:10.5pt;"> </span></font></div>
<div><font face="Consolas" size="2"><span style="font-size:10.5pt;">This e-mail message is intended only for the use of the named recipient–(s) and contains information which may be confidential or privileged. If you are not the intended recipient, be aware
that any distribution, or use of the contents of this information is prohibited. If you have received this electronic transmission in error, please notify the sender and delete the material from the computer.</span></font></div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
</span></font>
</body>
</html>