summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorBjorn Munch <bjorn.munch@oracle.com>2014-07-09 10:11:38 +0200
committerBjorn Munch <bjorn.munch@oracle.com>2014-07-09 10:11:38 +0200
commit9956d716378c7b5473988058d7680fdc39af5bde (patch)
tree0d4a2181cea4c311e33d4909d3ad5f276acdf07c /cmake
parent4126c2760d2235e99456ced10698c001b845a8aa (diff)
downloadmariadb-git-9956d716378c7b5473988058d7680fdc39af5bde.tar.gz
Bug #19149091 5.5 BUILD BREAKS ON LINUX IF SUN DTRACE IS INSTALLED
Add some code adapted from 5.6 to check for "real" DTrace. If found, and system is Linux, we simply set DTRACE to OFF. Otherwise no change. Build will still break if one tries to manually set DTRACE to ON.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/dtrace.cmake10
1 files changed, 9 insertions, 1 deletions
diff --git a/cmake/dtrace.cmake b/cmake/dtrace.cmake
index 66b07c03e9b..0a772ca2ba8 100644
--- a/cmake/dtrace.cmake
+++ b/cmake/dtrace.cmake
@@ -37,7 +37,15 @@ MACRO(CHECK_DTRACE)
# On FreeBSD, dtrace does not handle userland tracing yet
IF(DTRACE AND NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD"
AND NOT BUGGY_GCC_NO_DTRACE_MODULES)
- SET(ENABLE_DTRACE ON CACHE BOOL "Enable dtrace")
+ # 5.5 not able to do Sun dtrace on linux, just disable it
+ EXECUTE_PROCESS(
+ COMMAND ${DTRACE} -V
+ OUTPUT_VARIABLE out)
+ IF(out MATCHES "Sun D" AND CMAKE_SYSTEM_NAME MATCHES "Linux")
+ SET(ENABLE_DTRACE OFF CACHE BOOL "Sun DTrace on Linux not supported")
+ ELSE()
+ SET(ENABLE_DTRACE ON CACHE BOOL "Enable dtrace")
+ ENDIF()
ENDIF()
SET(HAVE_DTRACE ${ENABLE_DTRACE})
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")