1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 13:56:37 +02:00

core: add option POST_BUILD in add_custom_command

This fixes the following CMake warning:

CMake Warning (dev) at src/gui/curses/normal/CMakeLists.txt:73 (add_custom_command):
  Exactly one of PRE_BUILD, PRE_LINK, or POST_BUILD must be given.  Assuming
  POST_BUILD to preserve backward compatibility.

  Policy CMP0175 is not set: add_custom_command() rejects invalid arguments.
  Run "cmake --help-policy CMP0175" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.
This commit is contained in:
Sébastien Helleu
2024-12-21 14:42:12 +01:00
parent 46f322c10f
commit 732bfe4a48
+1
View File
@@ -72,6 +72,7 @@ target_link_libraries(${EXECUTABLE}
# It may be removed in future.
add_custom_command(
TARGET ${EXECUTABLE}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E remove -f "weechat-curses${CMAKE_EXECUTABLE_SUFFIX}"
COMMAND ${CMAKE_COMMAND} -E create_symlink "weechat${CMAKE_EXECUTABLE_SUFFIX}" "weechat-curses${CMAKE_EXECUTABLE_SUFFIX}"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"