Skip to content

Commit

Permalink
MDEV-16662: cmake: CMP0026 compatible for dtrace
Browse files Browse the repository at this point in the history
cmake enabling -DENABLE_DTRACE=ON is particularlly noisy with CMP0026
errors.

Fixed in the same way as 6b53f9d
  • Loading branch information
grooverdan authored and an3l committed Feb 25, 2020
1 parent affe7fa commit c749eb2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cmake/dtrace.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 "")
Expand Down

0 comments on commit c749eb2

Please sign in to comment.