diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-08-25 13:50:35 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-08-25 13:50:35 +0400 |
commit | b8c51743357c4bc1fc5067dc0bd5e8992310c93d (patch) | |
tree | 107b63862fa9ed007f5b52ac318bde810b921a6e /CMakeLists.txt | |
parent | c902ecdf5a000d02884dbcd811e7f97b5477ad9f (diff) | |
download | rspamd-b8c51743357c4bc1fc5067dc0bd5e8992310c93d.tar.gz rspamd-b8c51743357c4bc1fc5067dc0bd5e8992310c93d.zip |
* Improve google perf tools support
* Pass to event_add only copies of struct timeval to avoid timing problems
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3024a07d2..d52ee61ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -147,6 +147,21 @@ IF(ENABLE_PROFILING MATCHES "ON") ENDIF(ENABLE_PROFILING MATCHES "ON") IF(ENABLE_GPERF_TOOLS MATCHES "ON") + FIND_PATH(GPERF_INCLUDE google/profiler.h PATHS /opt/include + /usr/include + /usr/local/include + DOC "Path where google perftools includes can be found") + INCLUDE_DIRECTORIES("${GPERF_INCLUDE}") + FIND_LIBRARY(GPERF_LIBRARY NAMES profiler PATHS /lib + /opt/lib + /usr/lib + /usr/local/lib + DOC "Path where the gperf library can be found") + IF(NOT GPERF_LIBRARY) + MESSAGE(FATAL_ERROR "gperf tools support is enabled but not found in system") + ENDIF(NOT GPERF_LIBRARY) + GET_FILENAME_COMPONENT(GPERF_PATH "${GPERF_LIBRARY}" PATH) + LINK_DIRECTORIES("${GPERF_PATH}") SET(WITH_GPERF_TOOLS 1) ENDIF(ENABLE_GPERF_TOOLS MATCHES "ON") @@ -429,6 +444,7 @@ ADD_EXECUTABLE(rspamd ${RSPAMDSRC} ${CONTRIBSRC} ${TOKENIZERSSRC} ${CLASSIFIERSSRC} ${PLUGINSSRC} ${YACC_OUTPUT} ${LEX_OUTPUT}) SET_TARGET_PROPERTIES(rspamd PROPERTIES LINKER_LANGUAGE C) +SET_TARGET_PROPERTIES(rspamd PROPERTIES COMPILE_FLAGS "-DRSPAMD_MAIN") SET_TARGET_PROPERTIES(rspamd PROPERTIES VERSION ${RSPAMD_VERSION}) IF(ENABLE_PERL MATCHES "ON") |