Commit 150f2385 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Workaround buggy Linux dtrace - it fails on fedora if CC is set to 'ccache gcc'

parent 0d0e68da
...@@ -34,9 +34,15 @@ MACRO(CHECK_DTRACE) ...@@ -34,9 +34,15 @@ MACRO(CHECK_DTRACE)
FIND_PROGRAM(DTRACE dtrace) FIND_PROGRAM(DTRACE dtrace)
MARK_AS_ADVANCED(DTRACE) MARK_AS_ADVANCED(DTRACE)
IF(CMAKE_C_COMPILER MATCHES "ccache" AND CMAKE_SYSTEM_NAME MATCHES "Linux")
# dtrace fails on fedora if CC='ccache gcc' is used
SET(BUGGY_LINUX_DTRACE 1)
ENDIF()
# On FreeBSD, dtrace does not handle userland tracing yet # On FreeBSD, dtrace does not handle userland tracing yet
IF(DTRACE AND NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD" IF(DTRACE AND NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD"
AND NOT BUGGY_GCC_NO_DTRACE_MODULES) AND NOT BUGGY_GCC_NO_DTRACE_MODULES
AND NOT BUGGY_LINUX_DTRACE)
SET(ENABLE_DTRACE ON CACHE BOOL "Enable dtrace") SET(ENABLE_DTRACE ON CACHE BOOL "Enable dtrace")
ENDIF() ENDIF()
SET(HAVE_DTRACE ${ENABLE_DTRACE}) SET(HAVE_DTRACE ${ENABLE_DTRACE})
......
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