From 9e2726b408e658df1544854fc5b1be401bb81976 Mon Sep 17 00:00:00 2001 From: "Jonathan R. Madsen" Date: Mon, 22 Jan 2024 00:55:03 -0600 Subject: [PATCH] Update cmake/rocprofiler_config_nolink_target.cmake (#395) - skip getting target properties if not a cmake target [ROCm/rocprofiler-sdk commit: bd80fa168e8f26fdd65114794a1ef148733d7e6d] --- .../cmake/rocprofiler_config_nolink_target.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/projects/rocprofiler-sdk/cmake/rocprofiler_config_nolink_target.cmake b/projects/rocprofiler-sdk/cmake/rocprofiler_config_nolink_target.cmake index a32ce3d11c..7d64c42346 100644 --- a/projects/rocprofiler-sdk/cmake/rocprofiler_config_nolink_target.cmake +++ b/projects/rocprofiler-sdk/cmake/rocprofiler_config_nolink_target.cmake @@ -8,6 +8,14 @@ include_guard(GLOBAL) # related properties. Function is potentially recursive -- it should not be used if there # is a cyclic target dependency. function(rocprofiler_config_nolink_target _DST _SRC) + # skip if not a cmake target but process any extra args + if(NOT TARGET "${_SRC}") + foreach(_LIB ${ARGN}) + rocprofiler_config_nolink_target(${_DST} ${_LIB}) + endforeach() + return() + endif() + set(_LINK_LIBRARIES) set(_INCLUDE_DIRS) set(_COMPILE_DEFS)