From 732bfe4a482573f74443bdacd8d278afcdae6d69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 21 Dec 2024 14:42:12 +0100 Subject: [PATCH] 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. --- src/gui/curses/normal/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/curses/normal/CMakeLists.txt b/src/gui/curses/normal/CMakeLists.txt index 1716905a8..43c48de74 100644 --- a/src/gui/curses/normal/CMakeLists.txt +++ b/src/gui/curses/normal/CMakeLists.txt @@ -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}"