|
|
@ -6,14 +6,16 @@ cmake_minimum_required(VERSION 2.6) |
|
|
|
|
|
|
|
|
|
|
|
include(CTest) |
|
|
|
include(CTest) |
|
|
|
|
|
|
|
|
|
|
|
option(HARDENING "Enable hardening options" OFF) |
|
|
|
option(WITH_CLIENT "Simple client for configuring daemon" ON) |
|
|
|
|
|
|
|
option(WITH_CSOCKET "Unix control socket support for daemon" ON) |
|
|
|
|
|
|
|
option(WITH_HARDENING "Enable hardening options" OFF) |
|
|
|
option(WITH_PCRE "Build pcre-compatible filter" ON) |
|
|
|
option(WITH_PCRE "Build pcre-compatible filter" ON) |
|
|
|
|
|
|
|
|
|
|
|
set(CMAKE_INSTALL_PREFIX "/usr/local") |
|
|
|
set(CMAKE_INSTALL_PREFIX "/usr/local") |
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -std=c99") |
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -std=c99") |
|
|
|
add_definitions("-D_XOPEN_SOURCE=600") |
|
|
|
add_definitions("-D_XOPEN_SOURCE=600") |
|
|
|
|
|
|
|
|
|
|
|
if (HARDENING) |
|
|
|
if (WITH_HARDENING) |
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat -Wformat-security -Werror=format-security" ) |
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat -Wformat-security -Werror=format-security" ) |
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector --param ssp-buffer-size=4" ) |
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector --param ssp-buffer-size=4" ) |
|
|
|
add_definitions("-D_FORTIFY_SOURCE=2") |
|
|
|
add_definitions("-D_FORTIFY_SOURCE=2") |
|
|
@ -24,7 +26,9 @@ message(STATUS "- CFLAGS : ${CMAKE_C_FLAGS}") |
|
|
|
message(STATUS "Prefix : ${CMAKE_INSTALL_PREFIX}") |
|
|
|
message(STATUS "Prefix : ${CMAKE_INSTALL_PREFIX}") |
|
|
|
message(STATUS "Build type : ${CMAKE_BUILD_TYPE}") |
|
|
|
message(STATUS "Build type : ${CMAKE_BUILD_TYPE}") |
|
|
|
message(STATUS "Options:") |
|
|
|
message(STATUS "Options:") |
|
|
|
message(STATUS "- HARDENING: ${HARDENING}") |
|
|
|
message(STATUS "- WITH_CLIENT : ${WITH_CLIENT}") |
|
|
|
|
|
|
|
message(STATUS "- WITH_CSOCKET : ${WITH_CSOCKET}") |
|
|
|
|
|
|
|
message(STATUS "- WITH_HARDENING : ${WITH_HARDENING}") |
|
|
|
message(STATUS "- WITH_PCRE : ${WITH_PCRE}") |
|
|
|
message(STATUS "- WITH_PCRE : ${WITH_PCRE}") |
|
|
|
message(STATUS "Components:") |
|
|
|
message(STATUS "Components:") |
|
|
|
|
|
|
|
|
|
|
|