summaryrefslogtreecommitdiff
path: root/src/support
diff options
context:
space:
mode:
author杨威 <[email protected]>2023-04-27 11:07:07 +0800
committer杨威 <[email protected]>2023-05-04 17:44:49 +0800
commit219b474fd4ea5939c56c90086d03ece28acd21dd (patch)
tree903f2f9451760b6b9805481c1ac089a94ca7a7f1 /src/support
parentd5889c4b1fbebb15c4a3998e87b532694d850d22 (diff)
🔧 build(cmakelist): 更新cmake版本要求,移除_BSD_SOURCE宏
Diffstat (limited to 'src/support')
-rw-r--r--src/support/CMakeLists.txt2
-rw-r--r--src/support/MESA_sleep/CMakeLists.txt4
-rw-r--r--src/support/MESA_socket_wrap/src/CMakeLists.txt4
-rw-r--r--src/support/cpu_limit/CMakeLists.txt4
-rw-r--r--src/support/dictator2/src/CMakeLists.txt4
-rw-r--r--src/support/dpdk_rte_hash/CMakeLists.txt4
-rw-r--r--src/support/md5/CMakeLists.txt4
-rw-r--r--src/support/symbol_check/CMakeLists.txt4
-rw-r--r--src/support/timeout/CMakeLists.txt2
-rw-r--r--src/support/timestamp_record/CMakeLists.txt4
-rw-r--r--src/support/tomlc99_wrap/CMakeLists.txt4
-rw-r--r--src/support/tomlc99_wrap/Makefile2
12 files changed, 21 insertions, 21 deletions
diff --git a/src/support/CMakeLists.txt b/src/support/CMakeLists.txt
index 62a2ab9..d1fb998 100644
--- a/src/support/CMakeLists.txt
+++ b/src/support/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8...3.10)
add_subdirectory(timestamp_record)
add_subdirectory(symbol_check)
diff --git a/src/support/MESA_sleep/CMakeLists.txt b/src/support/MESA_sleep/CMakeLists.txt
index 45e5205..d1e4d71 100644
--- a/src/support/MESA_sleep/CMakeLists.txt
+++ b/src/support/MESA_sleep/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8...3.10)
#include_directories(${CMAKE_SOURCE_DIR}/packet_io)
#include_directories(${CMAKE_SOURCE_DIR}/project)
@@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 2.8)
#include_directories(${CMAKE_SOURCE_DIR}/include/support)
#include_directories(${CMAKE_SOURCE_DIR}/dealpkt)
-add_definitions(-D_BSD_SOURCE -D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H)
+add_definitions(-D_DEFAULT_SOURCE -D_DEFAULT_SOURCE -D__DEFAULT_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H)
add_definitions(-fPIC)
add_library(MESA_sleep STATIC mesa_sleep_nowatchBGT.c)
diff --git a/src/support/MESA_socket_wrap/src/CMakeLists.txt b/src/support/MESA_socket_wrap/src/CMakeLists.txt
index c57f548..2c61912 100644
--- a/src/support/MESA_socket_wrap/src/CMakeLists.txt
+++ b/src/support/MESA_socket_wrap/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8...3.10)
#include_directories(${CMAKE_SOURCE_DIR}/packet_io)
#include_directories(${CMAKE_SOURCE_DIR}/project)
@@ -6,6 +6,6 @@ cmake_minimum_required(VERSION 2.8)
#include_directories(${CMAKE_SOURCE_DIR}/include/support)
include_directories(${CMAKE_SOURCE_DIR}/include)
-add_definitions(-fPIC -D_BSD_SOURCE -D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H)
+add_definitions(-fPIC -D_DEFAULT_SOURCE -D_DEFAULT_SOURCE -D__DEFAULT_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H)
add_library(MESA_socket_wrap STATIC MESA_socket_wrap.c)
diff --git a/src/support/cpu_limit/CMakeLists.txt b/src/support/cpu_limit/CMakeLists.txt
index 3509719..bd2ca10 100644
--- a/src/support/cpu_limit/CMakeLists.txt
+++ b/src/support/cpu_limit/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8...3.10)
include_directories(${CMAKE_SOURCE_DIR}/include)
include_directories(${CMAKE_SOURCE_DIR}/include/private)
@@ -7,6 +7,6 @@ include_directories(${CMAKE_SOURCE_DIR}/include/support)
include_directories(/opt/MESA/include/MESA)
include_directories(/opt/MESA/include/)
-add_definitions(-D_BSD_SOURCE -D_GNU_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H -fPIC)
+add_definitions(-D_DEFAULT_SOURCE -D_GNU_SOURCE -D__DEFAULT_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H -fPIC)
add_library(cpu_limit STATIC cpu_limit.c)
diff --git a/src/support/dictator2/src/CMakeLists.txt b/src/support/dictator2/src/CMakeLists.txt
index 786a2f7..d5f0315 100644
--- a/src/support/dictator2/src/CMakeLists.txt
+++ b/src/support/dictator2/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8...3.10)
include_directories(${MESA_SDK_PREFIX}/include)
include_directories(${MESA_SDK_PREFIX}/include/MESA)
@@ -8,7 +8,7 @@ include_directories(${MESA_SDK_PREFIX}/include/MESA)
#include_directories(${CMAKE_SOURCE_DIR}/include/support)
#include_directories(${CMAKE_SOURCE_DIR}/dealpkt)
-add_definitions(${MEM_POOL_DEFINITIONS} -D_BSD_SOURCE -D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H)
+add_definitions(${MEM_POOL_DEFINITIONS} -D_DEFAULT_SOURCE -D_DEFAULT_SOURCE -D__DEFAULT_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H)
add_library(dictator2 STATIC dictator.cpp dictator_debuger.cpp
D_internal/D_kernel_list.cpp D_internal/list_common.cpp
D_internal/MESA_hash_v2.cpp D_internal/MESA_list_v2.cpp)
diff --git a/src/support/dpdk_rte_hash/CMakeLists.txt b/src/support/dpdk_rte_hash/CMakeLists.txt
index e58052d..dec6272 100644
--- a/src/support/dpdk_rte_hash/CMakeLists.txt
+++ b/src/support/dpdk_rte_hash/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8...3.10)
include_directories(${CMAKE_SOURCE_DIR}/include)
include_directories(${CMAKE_SOURCE_DIR}/include/private)
@@ -10,6 +10,6 @@ include_directories(${CMAKE_SOURCE_DIR}/src/support/dpdk_rte_hash/generic)
#set(CMAKE_C_FLAGS "-DLINK_MODE_DYNAMIC=1")
set(CMAKE_C_FLAGS "-std=c99")
-add_definitions(-fPIC -D_BSD_SOURCE -D_GNU_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H)
+add_definitions(-fPIC -D_DEFAULT_SOURCE -D_GNU_SOURCE -D__DEFAULT_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H)
add_library(dpdk_ip_hash STATIC dpdk_hash_crc.c)
diff --git a/src/support/md5/CMakeLists.txt b/src/support/md5/CMakeLists.txt
index a866e7e..e51470a 100644
--- a/src/support/md5/CMakeLists.txt
+++ b/src/support/md5/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8...3.10)
#include_directories(${CMAKE_SOURCE_DIR}/packet_io)
#include_directories(${CMAKE_SOURCE_DIR}/project)
@@ -6,6 +6,6 @@ cmake_minimum_required(VERSION 2.8)
#include_directories(${CMAKE_SOURCE_DIR}/include/support)
#include_directories(${CMAKE_SOURCE_DIR}/dealpkt)
-add_definitions(-fPIC -D_BSD_SOURCE -D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H)
+add_definitions(-fPIC -D_DEFAULT_SOURCE -D_DEFAULT_SOURCE -D__DEFAULT_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H)
add_library(md5 STATIC md5.c)
diff --git a/src/support/symbol_check/CMakeLists.txt b/src/support/symbol_check/CMakeLists.txt
index 3c9c750..132466b 100644
--- a/src/support/symbol_check/CMakeLists.txt
+++ b/src/support/symbol_check/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8...3.10)
include_directories(${CMAKE_SOURCE_DIR}/include)
include_directories(${CMAKE_SOURCE_DIR}/include/private)
@@ -7,6 +7,6 @@ include_directories(${CMAKE_SOURCE_DIR}/include/support)
include_directories(/opt/MESA/include/MESA)
include_directories(/opt/MESA/include/)
-add_definitions(-D_BSD_SOURCE -D_GNU_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H)
+add_definitions(-D_DEFAULT_SOURCE -D_GNU_SOURCE -D__DEFAULT_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H)
add_library(symbol_check STATIC libsymbol_check.cpp)
diff --git a/src/support/timeout/CMakeLists.txt b/src/support/timeout/CMakeLists.txt
index 6e1b7f3..3624d70 100644
--- a/src/support/timeout/CMakeLists.txt
+++ b/src/support/timeout/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8...3.10)
include_directories(${CMAKE_SOURCE_DIR}/include/support)
diff --git a/src/support/timestamp_record/CMakeLists.txt b/src/support/timestamp_record/CMakeLists.txt
index 4c395eb..03e0732 100644
--- a/src/support/timestamp_record/CMakeLists.txt
+++ b/src/support/timestamp_record/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8...3.10)
include_directories(${CMAKE_SOURCE_DIR}/src/packet_io)
include_directories(${CMAKE_SOURCE_DIR}/include)
@@ -9,6 +9,6 @@ include_directories(${CMAKE_SOURCE_DIR}/src/dealpkt)
include_directories(/opt/MESA/include/MESA)
include_directories(/opt/MESA/include/)
-add_definitions(-D_BSD_SOURCE -D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H)
+add_definitions(-D_DEFAULT_SOURCE -D_DEFAULT_SOURCE -D__DEFAULT_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H)
add_library(timestamp_record STATIC timestamp_record.cpp)
diff --git a/src/support/tomlc99_wrap/CMakeLists.txt b/src/support/tomlc99_wrap/CMakeLists.txt
index 21cdd5b..ff081db 100644
--- a/src/support/tomlc99_wrap/CMakeLists.txt
+++ b/src/support/tomlc99_wrap/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8...3.10)
include_directories(${CMAKE_SOURCE_DIR}/include)
include_directories(${CMAKE_SOURCE_DIR}/include/private)
@@ -7,6 +7,6 @@ include_directories(${CMAKE_SOURCE_DIR}/include/public)
#set(CMAKE_C_FLAGS "-DLINK_MODE_DYNAMIC=1")
set(CMAKE_C_FLAGS "-std=c99")
-add_definitions(-fPIC -D_BSD_SOURCE -D_GNU_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H)
+add_definitions(-fPIC -D_DEFAULT_SOURCE -D_GNU_SOURCE -D__DEFAULT_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H)
add_library(tomlc99_wrap STATIC toml.c tomlc99_wrap.c)
diff --git a/src/support/tomlc99_wrap/Makefile b/src/support/tomlc99_wrap/Makefile
index a99354a..f754bb4 100644
--- a/src/support/tomlc99_wrap/Makefile
+++ b/src/support/tomlc99_wrap/Makefile
@@ -2,7 +2,7 @@ CC = gcc
CCC = g++
CFILES = toml.c
-CFLAGS = -D_GNU_SOURCE -D_BSD_SOURCE -std=c99 -Wall -Wextra -fPIC
+CFLAGS = -D_GNU_SOURCE -D_DEFAULT_SOURCE -std=c99 -Wall -Wextra -fPIC
# to compile for debug: make DEBUG=1
# to compile for no debug: make
CFLAGS += -O0 -g