diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-10-27 18:18:00 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-10-27 18:18:00 +0100 |
commit | 649f9aa4a32fc51c1b60b28fa8830a603c88fcad (patch) | |
tree | c9281de9bac59fffe805c395063c98a2373624ef /src/CMakeLists.txt | |
parent | c974d1eaaaee82906415b3608089f24461daf86c (diff) | |
download | rspamd-649f9aa4a32fc51c1b60b28fa8830a603c88fcad.tar.gz rspamd-649f9aa4a32fc51c1b60b28fa8830a603c88fcad.zip |
[Feature] Allow to add 3rd party clang plugins
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0f9cbd668..ff7198270 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -62,7 +62,20 @@ ENDMACRO(AddModules MLIST WLIST) # Rspamd core components IF (ENABLE_CLANG_PLUGIN MATCHES "ON") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Xclang -load -Xclang ${CMAKE_CURRENT_BINARY_DIR}/../clang-plugin/librspamd-clang.so -Xclang -add-plugin -Xclang rspamd-ast") + SET(CMAKE_C_FLAGS + "${CMAKE_C_FLAGS} -Xclang -load -Xclang ${CMAKE_CURRENT_BINARY_DIR}/../clang-plugin/librspamd-clang.so -Xclang -add-plugin -Xclang rspamd-ast") + IF(CLANG_EXTRA_PLUGINS_LIBS) + FOREACH(_lib ${CLANG_EXTRA_PLUGINS_LIBS}) + SET(CMAKE_C_FLAGS + "${CMAKE_C_FLAGS} -Xclang -load -Xclang ${_lib}") + ENDFOREACH() + ENDIF() + IF(CLANG_EXTRA_PLUGINS) + FOREACH(_plug ${CLANG_EXTRA_PLUGINS}) + SET(CMAKE_C_FLAGS + "${CMAKE_C_FLAGS} -Xclang -add-plugin -Xclang ${_plug}") + ENDFOREACH() + ENDIF() ENDIF () ADD_SUBDIRECTORY(lua) |