[CMake] Remove a custom command added with add_custom_command(<target> POST_BUILD ...)
Olivier Gomez
oliviergomez.og at gmail.com
Tue Mar 5 12:01:35 EST 2019
Hello,
I have been searching for a way to remove a custom command (POST_BUILD
event) from a target in CMake but, so far, I've found nothing.
I tried to add another custom command to override the first one but it seems
to append a second command.
I tough that could work because of the first signature of
add_custom_command() that can take an optional argument named APPEND.
https://cmake.org/cmake/help/v3.4/command/add_custom_command.html#generating-files
Then, I looked for a target property that contains the POST_BUILD custom
command (to erase it) but, again, I found nothing related (I listed every
property using the "cmake --help-property-list" command).
The context is that I configure a project using a "CMake SDK" from a third
party library (custom functions that create and configure a shared library
target basically).
Until recently, I used to create those target by myself using standard CMake
command.
But now I switched to the "SDK" because it does a lot of specific thing
depending on the platform (and between the current version of the SDK and
all the legacy version) and I don't want to rewrite everything.
Specifically, this SDK add a custom command as a POST_BUILD event to run a
tool that perform a signature on the produced library. As it is a
proprietary tool that requires a valid licence to work, I want to remove
that command in order to have a successful build even if i don't currently
have a licence on my machine.
So ... is there some way to remove a custom command in CMake ? (or ignore
failed command maybe)
Best regards,
Olivier Gomez
--
Sent from: http://cmake.3232098.n2.nabble.com/
More information about the CMake
mailing list