From dec7620abe3a1111456f4cd7d75dd89fe40cbd5f Mon Sep 17 00:00:00 2001 From: Vlad Sytchenko Date: Mon, 22 Jun 2020 16:24:53 -0400 Subject: [PATCH] Blit Object target and file should have different names This is to avoid circular dependencies when using Ninja as a generator. Change-Id: I703f225c9f342dfb07c36ad0920927c40c922fb8 [ROCm/ROCR-Runtime commit: ea80e94756530c80a5aebe47567d344f72c269c4] --- projects/rocr-runtime/runtime/hsa-runtime/CMakeLists.txt | 2 +- .../runtime/hsa-runtime/image/blit_src/CMakeLists.txt | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/CMakeLists.txt b/projects/rocr-runtime/runtime/hsa-runtime/CMakeLists.txt index 75d8ccdce9..9de7842a75 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/CMakeLists.txt +++ b/projects/rocr-runtime/runtime/hsa-runtime/CMakeLists.txt @@ -263,7 +263,7 @@ if(${IMAGE_SUPPORT}) ## Depend on blit kernel target. add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/image/blit_src ) - add_dependencies( ${CORE_RUNTIME_TARGET} opencl_blit_objects.cpp ) + add_dependencies( ${CORE_RUNTIME_TARGET} opencl_blit_objects ) endif() diff --git a/projects/rocr-runtime/runtime/hsa-runtime/image/blit_src/CMakeLists.txt b/projects/rocr-runtime/runtime/hsa-runtime/image/blit_src/CMakeLists.txt index f80b2fd035..ef59715a23 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/image/blit_src/CMakeLists.txt +++ b/projects/rocr-runtime/runtime/hsa-runtime/image/blit_src/CMakeLists.txt @@ -169,14 +169,14 @@ function(generate_blit_file BFILE) ## Add a custom command that generates opencl_blit_objects.cpp ## This depends on all the generated code object files and the C++ generator script. - add_custom_command(OUTPUT ${BFILE} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/create_hsaco_ascii_file.sh ${CMAKE_CURRENT_BINARY_DIR}/${BFILE} + add_custom_command(OUTPUT ${BFILE}.cpp + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/create_hsaco_ascii_file.sh ${CMAKE_CURRENT_BINARY_DIR}/${BFILE}.cpp DEPENDS ${HSACO_TARG_LIST} create_hsaco_ascii_file.sh ) ## Export a target that builds (and depends on) opencl_blit_objects.cpp - add_custom_target( ${BFILE} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${BFILE} ) + add_custom_target( ${BFILE} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${BFILE}.cpp ) endfunction(generate_blit_file) build_kernel_for_devices("ocl_blit_object") -generate_blit_file("opencl_blit_objects.cpp") +generate_blit_file("opencl_blit_objects")