Commit fa164a61 authored by Bjorn Munch's avatar Bjorn Munch

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.
parent 4b6f582a
......@@ -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")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment