diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-06-02 12:08:38 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-06-02 12:08:38 +0100 |
commit | 4e0274cbc535ebf3fe0f371f4099e99870418ad9 (patch) | |
tree | 901608dfaa0bd86b06366f76871a0ae655b78174 /cmake/OSDep.cmake | |
parent | b488a309f514fecf7cda9bb5ccb53803a5034210 (diff) | |
download | rspamd-4e0274cbc535ebf3fe0f371f4099e99870418ad9.tar.gz rspamd-4e0274cbc535ebf3fe0f371f4099e99870418ad9.zip |
[Minor] Replace ADD_DEFINITIONS with ADD_COMPILE_OPTIONS
Diffstat (limited to 'cmake/OSDep.cmake')
-rw-r--r-- | cmake/OSDep.cmake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmake/OSDep.cmake b/cmake/OSDep.cmake index 93f814675..a48f9d17b 100644 --- a/cmake/OSDep.cmake +++ b/cmake/OSDep.cmake @@ -1,6 +1,6 @@ # Platform specific configuration IF(CMAKE_SYSTEM_NAME MATCHES "^.*BSD$|DragonFly") - ADD_DEFINITIONS(-DFREEBSD -D_BSD_SOURCE) + ADD_COMPILE_OPTIONS(-DFREEBSD -D_BSD_SOURCE) CONFIGURE_FILE(freebsd/rspamd.sh.in freebsd/rspamd @ONLY) MESSAGE(STATUS "Configuring for BSD system") # Find util library @@ -20,7 +20,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "^.*BSD$|DragonFly") ENDIF() IF(CMAKE_SYSTEM_NAME STREQUAL "Darwin") - ADD_DEFINITIONS(-D_BSD_SOURCE -DDARWIN) + ADD_COMPILE_OPTIONS(-D_BSD_SOURCE -DDARWIN) SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS} -undefined dynamic_lookup") IF(ENABLE_LUAJIT MATCHES "ON") SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pagezero_size 10000 -image_base 100000000") @@ -31,7 +31,7 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "Darwin") ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Darwin") IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") - ADD_DEFINITIONS(-D_GNU_SOURCE -DLINUX) + ADD_COMPILE_OPTIONS(-D_GNU_SOURCE -DLINUX) # Workaround with architecture specific includes #IF(IS_DIRECTORY "/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/") # INCLUDE_DIRECTORIES("/usr/include/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/") @@ -61,7 +61,7 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS") ENDIF(ENABLE_OPTIMIZATION MATCHES "ON") ENDIF("${CMAKE_C_COMPILER_ID}" MATCHES SunPro) - ADD_DEFINITIONS(-D__EXTENSIONS__ -DSOLARIS -D_POSIX_SOURCE -D_POSIX_C_SOURCE=200112) + ADD_COMPILE_OPTIONS(-D__EXTENSIONS__ -DSOLARIS -D_POSIX_SOURCE -D_POSIX_C_SOURCE=200112) LIST(APPEND CMAKE_REQUIRED_LIBRARIES rt) LIST(APPEND CMAKE_REQUIRED_LIBRARIES dl) LIST(APPEND CMAKE_REQUIRED_LIBRARIES resolv) |