diff options
author | Daniel Black <daniel@linux.ibm.com> | 2019-10-15 14:35:46 +1100 |
---|---|---|
committer | Anel <an3l@users.noreply.github.com> | 2020-02-25 08:10:17 +0100 |
commit | c749eb2b41545377166a94e25b3ab84991729bab (patch) | |
tree | e5125dcf2c0e756e554f7f4beca073b4db7dd1ea | |
parent | affe7fabc7baa36083e7632eb6c3611578d74b48 (diff) | |
download | mariadb-git-c749eb2b41545377166a94e25b3ab84991729bab.tar.gz |
MDEV-16662: cmake: CMP0026 compatible for dtrace
cmake enabling -DENABLE_DTRACE=ON is particularlly noisy with CMP0026
errors.
Fixed in the same way as 6b53f9d781cc19cbec96c3eb048e6407021685a2
-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 "") |