diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2014-01-27 18:31:34 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2014-01-27 18:31:34 +0000 |
| commit | 6894312e3e83301a6225416e22034c75e57b19b9 (patch) | |
| tree | 1be0ad3af54ac8255ceee1d98adbce23913f8472 /cpp/src | |
| parent | 99e34bb3e8f9b071c6c3337fbcf4be5ffd9b1720 (diff) | |
| download | qpid-python-6894312e3e83301a6225416e22034c75e57b19b9.tar.gz | |
QPID-5516: Only enable Dtrace style probes on Linux
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1561775 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
| -rw-r--r-- | cpp/src/CMakeLists.txt | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/cpp/src/CMakeLists.txt b/cpp/src/CMakeLists.txt index 7b8ea49251..46b526579f 100644 --- a/cpp/src/CMakeLists.txt +++ b/cpp/src/CMakeLists.txt @@ -391,14 +391,19 @@ if (NOT CMAKE_SYSTEM_NAME STREQUAL Windows) set (uuid_LIB "uuid") # Check for header file for dtrace static probes - check_include_files(sys/sdt.h HAVE_SYS_SDT_H) - if (HAVE_SYS_SDT_H) - set(probes_default ON) - endif (HAVE_SYS_SDT_H) - option(BUILD_PROBES "Build with DTrace/systemtap static probes" ${probes_default}) - if (NOT BUILD_PROBES) - set (HAVE_SYS_SDT_H 0) - endif (NOT BUILD_PROBES) + check_include_files(sys/sdt.h HAVE_SDT) + if (HAVE_SDT) + # Only enable by default on Linux + if (CMAKE_SYSTEM_NAME STREQUAL Linux) + set(probes_default ON) + endif (CMAKE_SYSTEM_NAME STREQUAL Linux) + option(BUILD_PROBES "Build with DTrace/systemtap static probes" "${probes_default}") + endif (HAVE_SDT) + if (BUILD_PROBES) + set (HAVE_SYS_SDT_H 1) + else (HAVE_SDT) + set (HAVE_SYS_SDT_H 0) + endif (BUILD_PROBES) # Check for poll/epoll header files check_include_files(sys/poll.h HAVE_POLL) |
