diff options
Diffstat (limited to 'cmake/dtrace.cmake')
-rw-r--r-- | cmake/dtrace.cmake | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cmake/dtrace.cmake b/cmake/dtrace.cmake index 4e0f7501045..1e29ba685e0 100644 --- a/cmake/dtrace.cmake +++ b/cmake/dtrace.cmake @@ -147,11 +147,10 @@ FUNCTION(DTRACE_INSTRUMENT target) # Note: DTrace probes in static libraries are unusable currently # (see explanation for DTRACE_INSTRUMENT_STATIC_LIBS below) # but maybe one day this will be fixed. - GET_TARGET_PROPERTY(target_location ${target} LOCATION) ADD_CUSTOM_COMMAND( TARGET ${target} POST_BUILD - COMMAND ${CMAKE_AR} r ${target_location} ${outfile} - COMMAND ${CMAKE_RANLIB} ${target_location} + COMMAND ${CMAKE_AR} r $<TARGET_FILE:${target}> ${outfile} + COMMAND ${CMAKE_RANLIB} $<TARGET_FILE:${target}> ) # Used in DTRACE_INSTRUMENT_WITH_STATIC_LIBS SET(TARGET_OBJECT_DIRECTORY_${target} ${objdir} CACHE INTERNAL "") |