https://git.reactos.org/?p=reactos.git;a=commitdiff;h=dadc59f1355424fd58623bfae2b3d2080acd5c02

commit dadc59f1355424fd58623bfae2b3d2080acd5c02
Author:     Thomas Faber <[email protected]>
AuthorDate: Sat Jun 6 22:57:11 2020 +0200
Commit:     Thomas Faber <[email protected]>
CommitDate: Sat Jun 20 15:25:27 2020 +0200

    [CMAKE] Mark host tools as byproducts. CORE-17109
---
 sdk/cmake/host-tools.cmake | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/sdk/cmake/host-tools.cmake b/sdk/cmake/host-tools.cmake
index 04e58f7c7bb..c14827590d3 100644
--- a/sdk/cmake/host-tools.cmake
+++ b/sdk/cmake/host-tools.cmake
@@ -27,17 +27,23 @@ function(configure_host_tools HOST_TOOLS_DIR)
 
     set_property(SOURCE host_tools PROPERTY SYMBOLIC 1)
 
+    include(${HOST_TOOLS_DIR}/ImportExecutables.cmake)
+    include(${HOST_TOOLS_DIR}/TargetList.cmake)
+
+    foreach(_target ${NATIVE_TARGETS})
+        get_target_property(_target_location native-${_target} LOCATION)
+        list(APPEND _target_locations ${_target_location})
+    endforeach()
+
     # Make a host-tools target so it'll be built when needed
     # custom target + symbolic output prevents cmake from running
     # the command multiple times per build
     add_custom_command(
         COMMAND ${CMAKE_COMMAND} --build ${HOST_TOOLS_DIR}
-        OUTPUT host_tools)
+        OUTPUT host_tools
+        BYPRODUCTS ${_target_locations})
     add_custom_target(build-host-tools ALL DEPENDS host_tools)
 
-    include(${HOST_TOOLS_DIR}/ImportExecutables.cmake)
-    include(${HOST_TOOLS_DIR}/TargetList.cmake)
-
     foreach(_target ${NATIVE_TARGETS})
         add_dependencies(native-${_target} build-host-tools)
     endforeach()

Reply via email to