summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@sun.com>2010-11-25 00:20:36 +0000
committerVladislav Vaintroub <wlad@sun.com>2010-11-25 00:20:36 +0000
commit3afaada70dfd3831b38d601d89d5e20b444fc645 (patch)
tree6f5126a62c57669134d458c31ac9b01471fe2c8e /cmake
parenta2505e9768e5a7a083efb6f8281684d3ed36f059 (diff)
downloadmariadb-git-3afaada70dfd3831b38d601d89d5e20b444fc645.tar.gz
Post-fix for Bug#58158 on Solaris
Problem : The build might fail with make[2]: *** No rule to make target `../sql/z', needed by `sql/mysqld_dtrace_all.o'. Stop. if one of plugins would depends on system libz library Fix: Filter out non-static dependent libraries when dtracing static libs
Diffstat (limited to 'cmake')
-rw-r--r--cmake/dtrace.cmake12
1 files changed, 11 insertions, 1 deletions
diff --git a/cmake/dtrace.cmake b/cmake/dtrace.cmake
index c12a74cba31..5beb45ca524 100644
--- a/cmake/dtrace.cmake
+++ b/cmake/dtrace.cmake
@@ -153,13 +153,23 @@ ENDFUNCTION()
# to mysqld.
MACRO (DTRACE_INSTRUMENT_STATIC_LIBS target libs)
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND ENABLE_DTRACE)
+ # Filter out non-static libraries in the list, if any
+ SET(static_libs)
FOREACH(lib ${libs})
+ GET_TARGET_PROPERTY(libtype ${lib} TYPE)
+ IF(libtype MATCHES STATIC_LIBRARY)
+ SET(static_libs ${static_lics} ${lib})
+ ENDIF()
+ ENDFOREACH()
+
+ FOREACH(lib ${static_libs})
SET(dirs ${dirs} ${TARGET_OBJECT_DIRECTORY_${lib}})
ENDFOREACH()
+
SET (obj ${CMAKE_CURRENT_BINARY_DIR}/${target}_dtrace_all.o)
ADD_CUSTOM_COMMAND(
OUTPUT ${obj}
- DEPENDS ${libs}
+ DEPENDS ${static_libs}
COMMAND ${CMAKE_COMMAND}
-DDTRACE=${DTRACE}
-DOUTFILE=${obj}