From da89b3e76e8e699f4b0ca47064ccbd765c010cbc Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Thu, 30 Nov 2023 03:36:07 +0000 Subject: [PATCH] SWDEV-388833 - Fix potential build issues with gcc tests Change-Id: I53c109ebaed60b085069d862d87ac8a3597331c5 --- catch/unit/gcc/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/catch/unit/gcc/CMakeLists.txt b/catch/unit/gcc/CMakeLists.txt index c7f7f8b1da..90e9c2db65 100644 --- a/catch/unit/gcc/CMakeLists.txt +++ b/catch/unit/gcc/CMakeLists.txt @@ -6,8 +6,10 @@ set(TEST_SRC gpu.cpp ) # Creating Custom object file -add_custom_target(LaunchKernel_custom COMMAND gcc -c ${CMAKE_CURRENT_SOURCE_DIR}/LaunchKernel.c -I${HIP_PATH}/include -D__HIP_PLATFORM_AMD__ -o LaunchKernel.o) -add_custom_target(hipMalloc_custom COMMAND gcc -c ${CMAKE_CURRENT_SOURCE_DIR}/hipMalloc.c -I${HIP_PATH}/include -D__HIP_PLATFORM_AMD__ -o hipMalloc.o) +add_custom_command(OUTPUT LaunchKernel.o COMMAND gcc -c ${CMAKE_CURRENT_SOURCE_DIR}/LaunchKernel.c -I${HIP_PATH}/include -D__HIP_PLATFORM_AMD__ -o LaunchKernel.o) +add_custom_target(LaunchKernel_custom DEPENDS LaunchKernel.o) +add_custom_command(OUTPUT hipMalloc.o COMMAND gcc -c ${CMAKE_CURRENT_SOURCE_DIR}/hipMalloc.c -I${HIP_PATH}/include -D__HIP_PLATFORM_AMD__ -o hipMalloc.o) +add_custom_target(hipMalloc_custom DEPENDS hipMalloc.o) add_library(LaunchKernel_lib OBJECT IMPORTED) add_library(hipMalloc_lib OBJECT IMPORTED)