You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 52c42b3
Browse filesBrowse the repository at this point in the historyBrowse files
The following pattern was used to add custom `make LuaJIT-foo` commands:
```cmake
add_custom_target(${PROJECT_NAME}-foo DEPENDS <...>)
add_custom_command(TARGET ${PROJECT_NAME}-foo
COMMAND <...>
)
```
However, recent cmake versions (verified on 4.3.4) warns about the
`add_custom_command` syntax (quoted [1]):
> `add_custom_command()` rejects invalid arguments.
>
> <...>
>
> The `TARGET` form requires exactly one of `PRE_BUILD`, `PRE_LINK`, or
> `POST_BUILD` to be given. Previously, if none were given, `POST_BUILD`
> was assumed, or if multiple keywords were given, the last one was
> used.
The fix could be add the `POST_BUILD` keyword. However, it is more
natural to just use `add_custom_target` with `COMMAND` instead:
```cmake
add_custom_target(${PROJECT_NAME}-foo
COMMAND <...>
DEPENDS <...>
)
```
The same change is proposed to tarantool: [2].
[1]: https://cmake.org/cmake/help/latest/policy/CMP0175.html
[2]: tarantool/tarantool#13177
Reviewed-by: Sergey Kaplun <skaplun@tarantool.org>
Reviewed-by: Sergey Bronnikov <sergeyb@tarantool.org>
Signed-off-by: Sergey Kaplun <skaplun@tarantool.org>
(cherry picked from commit f3829a4)
0 commit comments