X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=CMake%2F_Include.cmake;h=00da54f9a46b0012a4bc9a0cb71759ea61be09b7;hb=cdff9052fb343b977fc63ae65a947958eedaab91;hp=0f25ab4875a6eb363f298ade9b2c5646a51ae3ea;hpb=c3526f7547e7a69204a25982f6764afdab663252;p=awesomized%2Flibmemcached diff --git a/CMake/_Include.cmake b/CMake/_Include.cmake index 0f25ab48..00da54f9 100644 --- a/CMake/_Include.cmake +++ b/CMake/_Include.cmake @@ -14,6 +14,7 @@ include(CheckDebug) include(CheckDecl) include(CheckDependency) include(CheckHeader) +include(CheckCompiles) include(CheckType) include(CheckStdatomic) @@ -31,10 +32,15 @@ endif() ## dtrace if(ENABLE_DTRACE) - set(HAVE_DTRACE 1) + find_package(DTrace) + if(DTRACE_EXECUTABLE) + set(HAVE_DTRACE 1) + else() + message(WARNING "The dtrace command is required to enable dtrace/systemtap support.") + endif() endif() -##uuid +## uuid if(BUILD_TESTING) check_dependency(LIBUUID uuid uuid/uuid.h) endif() @@ -90,8 +96,9 @@ check_decl(MSG_MORE sys/socket.h) check_decl(MSG_NOSIGNAL sys/socket.h) check_decl(rcvtimeo sys/socket.h) check_decl(sndtimeo sys/socket.h) -check_decl(strerror_r string.h) check_decl(strerror string.h) +check_decl(strerror_r string.h) +check_compiles(HAVE_STRERROR_R_CHAR_P "char x, y = *strerror_r(0,&x,1);" string.h) check_decl(abi::__cxa_demangle cxxabi.h) set(HAVE_GCC_ABI_DEMANGLE ${HAVE_ABI____CXA_DEMANGLE})