Skip to content

Commit 40852eb

Browse files
committed
Added test for the dtrace program and enables its use if found
1 parent 7e7a579 commit 40852eb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,12 @@ endif()
6767
if(CMAKE_SYSTEM_NAME STREQUAL Android)
6868
set(ENABLE_DTRACE_DEFAULT OFF)
6969
else()
70-
set(ENABLE_DTRACE_DEFAULT ON)
70+
find_program(DTRACEPROG dtrace)
71+
if(DTRACEPROG)
72+
set(ENABLE_DTRACE_DEFAULT ON)
73+
else()
74+
set(ENABLE_DTRACE_DEFAULT OFF)
75+
endif()
7176
endif()
7277
option(ENABLE_DTRACE "enable dtrace support" ${ENABLE_DTRACE_DEFAULT})
7378

0 commit comments

Comments
 (0)