CMake: how do i depend on output from a custom target?

前端 未结 1 1011
难免孤独
难免孤独 2021-01-21 05:29

A traditional make process that I cannot modify produces a target on which I must do some post-processing.

I use add_custom_target to force the makefile to

1条回答
  •  别那么骄傲
    2021-01-21 05:46

    Make the add_custom_command call depend on a file that changes when "the external make actually updated its target." The custom command will only run if one of its DEPENDS is newer than its OUTPUT.

    The DEPENDS for CMake add_custom_command calls work best with older versions of CMake when they are full path file name references. More recent versions of CMake should work with file name or CMake target name references.

    0 讨论(0)
提交回复
热议问题