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 | |
parent | b488a309f514fecf7cda9bb5ccb53803a5034210 (diff) | |
download | rspamd-4e0274cbc535ebf3fe0f371f4099e99870418ad9.tar.gz rspamd-4e0274cbc535ebf3fe0f371f4099e99870418ad9.zip |
[Minor] Replace ADD_DEFINITIONS with ADD_COMPILE_OPTIONS
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/OSDep.cmake | 8 | ||||
-rw-r--r-- | cmake/Openblas.cmake | 6 |
2 files changed, 7 insertions, 7 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) diff --git a/cmake/Openblas.cmake b/cmake/Openblas.cmake index e2afa92c5..1907ccd21 100644 --- a/cmake/Openblas.cmake +++ b/cmake/Openblas.cmake @@ -17,10 +17,10 @@ IF(WITH_BLAS) IF(NOT HAVE_CBLAS_H) MESSAGE(STATUS "Blas header cblas.h has not been found, use internal workaround") ELSE() - ADD_DEFINITIONS(-DHAVE_CBLAS_H) + ADD_COMPILE_OPTIONS(-DHAVE_CBLAS_H) ENDIF() ELSE() - ADD_DEFINITIONS(-DHAVE_CBLAS_H) + ADD_COMPILE_OPTIONS(-DHAVE_CBLAS_H) ENDIF() - ADD_DEFINITIONS(-DHAVE_CBLAS) + ADD_COMPILE_OPTIONS(-DHAVE_CBLAS) ENDIF(WITH_BLAS)
\ No newline at end of file |