<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">In the meantime if this POST_BUILD command calls a specific tool you can create a no-op shell script with the same name and put its location in the PATH variable.</div>
<div name="messageReplySection">Le 6 mars 2019 à 07:41 +0100, Olivier Gomez <oliviergomez.og@gmail.com>, a écrit :<br />
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;">
<div dir="auto">
<div>Thank you for your suggestions.</div>
<div dir="auto">I think the best option is a patch but it will take some time ... I guess I will have to find a workaround in the meantime !</div>
<div dir="auto"><br /></div>
<div dir="auto">Anyway, thanks again !</div>
<div dir="auto">Olivier<br />
<br />
<div class="gmail_quote" dir="auto">
<div dir="ltr" class="gmail_attr">Le mar. 5 mars 2019 à 18:58, Kyle Edwards <<a href="mailto:kyle.edwards@kitware.com">kyle.edwards@kitware.com</a>> a écrit :<br /></div>
<blockquote class="gmail_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #e67e22;">On Tue, 2019-03-05 at 10:01 -0700, Olivier Gomez wrote:<br />
> Hello,<br />
><br />
> I have been searching for a way to remove a custom command<br />
> (POST_BUILD<br />
> event) from a target in CMake but, so far, I've found nothing.<br />
><br />
> I tried to add another custom command to override the first one but<br />
> it seems<br />
> to append a second command. <br />
> I tough that could work because of the first signature of<br />
> add_custom_command() that can take an optional argument named APPEND.<br />
> <a href="https://cmake.org/cmake/help/v3.4/command/add_custom_command.html#gen" rel="noreferrer noreferrer" target="_blank">https://cmake.org/cmake/help/v3.4/command/add_custom_command.html#gen</a><br />
> erating-files<br />
> Then, I looked for a target property that contains the POST_BUILD<br />
> custom<br />
> command (to erase it) but, again, I found nothing related (I listed<br />
> every<br />
> property using the "cmake --help-property-list" command).<br />
><br />
><br />
> The context is that I configure a project using a "CMake SDK" from a<br />
> third<br />
> party library (custom functions that create and configure a shared<br />
> library<br />
> target basically).<br />
> Until recently, I used to create those target by myself using<br />
> standard CMake<br />
> command.<br />
> But now I switched to the "SDK" because it does a lot of specific<br />
> thing<br />
> depending on the platform (and between the current version of the SDK<br />
> and<br />
> all the legacy version) and I don't want to rewrite everything.<br />
><br />
> Specifically, this SDK add a custom command as a POST_BUILD event to<br />
> run a<br />
> tool that perform a signature on the produced library. As it is a<br />
> proprietary tool that requires a valid licence to work, I want to<br />
> remove<br />
> that command in order to have a successful build even if i don't<br />
> currently<br />
> have a licence on my machine.<br />
><br />
> So ... is there some way to remove a custom command in CMake ? (or<br />
> ignore<br />
> failed command maybe)<br />
<br />
CMake doesn't have a way to remove a custom command from a target. Your<br />
best bet would be to either:<br />
<br />
1) Fork the SDK for your project to remove the proprietary tool, or<br />
2) Submit a patch upstream to add an option to disable the proprietary<br />
tool.<br />
<br />
Kyle<br /></blockquote>
</div>
</div>
</div>
--<br />
<br />
Powered by www.kitware.com<br />
<br />
Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ<br />
<br />
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br />
<br />
CMake Support: http://cmake.org/cmake/help/support.html<br />
CMake Consulting: http://cmake.org/cmake/help/consulting.html<br />
CMake Training Courses: http://cmake.org/cmake/help/training.html<br />
<br />
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br />
<br />
Follow this link to subscribe/unsubscribe:<br />
https://cmake.org/mailman/listinfo/cmake<br /></blockquote>
</div>
</body>
</html>