From 9d18096e1ef93e471c5d7ad06cd35e92bb1fe85e Mon Sep 17 00:00:00 2001 From: Felix Weinrank Date: Tue, 7 Nov 2017 15:46:54 +0100 Subject: CMakeLists - convert spaced to tabs --- CMakeLists.txt | 94 +++++++++++++-------------- programs/CMakeLists.txt | 52 +++++++-------- usrsctplib/CMakeLists.txt | 158 +++++++++++++++++++++++----------------------- 3 files changed, 152 insertions(+), 152 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e825250..9b3ab989 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,8 +34,8 @@ project(usrsctplib) # Debug build type as default if (NOT CMAKE_BUILD_TYPE) - message(STATUS "No build type selected, using DEBUG") - set(CMAKE_BUILD_TYPE "DEBUG") + message(STATUS "No build type selected, using DEBUG") + set(CMAKE_BUILD_TYPE "DEBUG") endif () include(CheckStructHasMember) @@ -49,22 +49,22 @@ include(CheckIncludeFiles) option(INVARIANTS "Add runtime checks" 0) if (INVARIANTS) - add_definitions(-DINVARIANTS) + add_definitions(-DINVARIANTS) endif () option(SCTP_DEBUG "Provide debug information" 1) if (SCTP_DEBUG) - add_definitions(-DSCTP_DEBUG) + add_definitions(-DSCTP_DEBUG) endif () option(INET "Support IPv4" 1) if (INET) - add_definitions(-DINET) + add_definitions(-DINET) endif () option(INET6 "Support IPv6" 1) if (INET6) - add_definitions(-DINET6) + add_definitions(-DINET6) endif () option(WERROR "Warning as error" 1) @@ -78,13 +78,13 @@ option(SANITIZER_ADDRESS "Compile with address sanitizer" 0) option(SANITIZER_MEMORY "Compile with memory sanitizer" 0) if (SANITIZER_ADDRESS AND SANITIZER_MEMORY) - message(FATAL_ERROR "Can not compile with both sanitizer options") + message(FATAL_ERROR "Can not compile with both sanitizer options") endif () if (LINK_PROGRAMS_STATIC OR WIN32) - set(PROGRAMS_LINK_LIBRARY "usrsctp-static") + set(PROGRAMS_LINK_LIBRARY "usrsctp-static") else () - set(PROGRAMS_LINK_LIBRARY "usrsctp") + set(PROGRAMS_LINK_LIBRARY "usrsctp") endif () @@ -94,27 +94,27 @@ endif () check_include_files("sys/queue.h" HAVE_SYS_QUEUE_H) if (HAVE_SYS_QUEUE_H) - add_definitions(-DHAVE_SYS_QUEUE_H) + add_definitions(-DHAVE_SYS_QUEUE_H) endif () check_include_files("sys/socket.h;linux/if_addr.h" HAVE_LINUX_IF_ADDR_H) if (HAVE_LINUX_IF_ADDR_H) - add_definitions(-DHAVE_LINUX_IF_ADDR_H) + add_definitions(-DHAVE_LINUX_IF_ADDR_H) endif () check_include_files("sys/socket.h;linux/rtnetlink.h" HAVE_LINUX_RTNETLINK_H) if (HAVE_LINUX_RTNETLINK_H) - add_definitions(-DHAVE_LINUX_RTNETLINK_H) + add_definitions(-DHAVE_LINUX_RTNETLINK_H) endif () check_include_files("sys/types.h;netinet/in.h;netinet/ip.h;netinet/ip_icmp.h" HAVE_NETINET_IP_ICMP_H) if (HAVE_NETINET_IP_ICMP_H) - add_definitions(-DHAVE_NETINET_IP_ICMP_H) + add_definitions(-DHAVE_NETINET_IP_ICMP_H) endif () check_include_files("stdatomic.h" HAVE_STDATOMIC_H) if (HAVE_STDATOMIC_H) - add_definitions(-DHAVE_STDATOMIC_H) + add_definitions(-DHAVE_STDATOMIC_H) endif () @@ -125,31 +125,31 @@ endif () set (CMAKE_REQUIRED_INCLUDES "${CMAKE_SOURCE_DIR}/usrsctplib") check_include_file(usrsctp.h HAVE_USRSCTP_H) if (NOT HAVE_USRSCTP_H) - message(FATAL_ERROR "usrsctp.h not found") + message(FATAL_ERROR "usrsctp.h not found") endif () check_struct_has_member("struct sockaddr" "sa_len" "sys/types.h;sys/socket.h" HAVE_SA_LEN) if (HAVE_SA_LEN) - message(STATUS "HAVE_SA_LEN") - add_definitions(-DHAVE_SA_LEN) + message(STATUS "HAVE_SA_LEN") + add_definitions(-DHAVE_SA_LEN) endif () check_struct_has_member("struct sockaddr_in" "sin_len" "sys/types.h;netinet/in.h" HAVE_SIN_LEN) if (HAVE_SIN_LEN) - message(STATUS "HAVE_SIN_LEN") - add_definitions(-DHAVE_SIN_LEN) + message(STATUS "HAVE_SIN_LEN") + add_definitions(-DHAVE_SIN_LEN) endif () check_struct_has_member("struct sockaddr_in6" "sin6_len" "sys/types.h;netinet/in.h" HAVE_SIN6_LEN) if (HAVE_SIN6_LEN) - message(STATUS "HAVE_SIN6_LEN") - add_definitions(-DHAVE_SIN6_LEN) + message(STATUS "HAVE_SIN6_LEN") + add_definitions(-DHAVE_SIN6_LEN) endif () check_struct_has_member("struct sockaddr_conn" "sconn_len" "usrsctp.h" HAVE_SCONN_LEN) if (HAVE_SCONN_LEN) - message(STATUS "HAVE_SCONN_LEN") - add_definitions(-DHAVE_SCONN_LEN) + message(STATUS "HAVE_SCONN_LEN") + add_definitions(-DHAVE_SCONN_LEN) endif () @@ -159,37 +159,37 @@ endif () # SETTINGS FOR UNIX COMPILER if ("x${CMAKE_C_COMPILER_ID}" STREQUAL "xClang" OR "x${CMAKE_C_COMPILER_ID}" STREQUAL "xGNU") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -pedantic -Wall -Wextra -Wfloat-equal -Wshadow -Wpointer-arith -Winit-self -Wno-unused-function -Wno-unused-parameter") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c99 -pedantic -Wall -Wextra -Wfloat-equal -Wshadow -Wpointer-arith -Winit-self -Wno-unused-function -Wno-unused-parameter") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -pedantic -Wall -Wextra -Wfloat-equal -Wshadow -Wpointer-arith -Winit-self -Wno-unused-function -Wno-unused-parameter") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c99 -pedantic -Wall -Wextra -Wfloat-equal -Wshadow -Wpointer-arith -Winit-self -Wno-unused-function -Wno-unused-parameter") - if (WERROR) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") - endif () + if (WERROR) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") + endif () - if (SANITIZER_ADDRESS) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -O1 -fno-omit-frame-pointer -g") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -O1 -fno-omit-frame-pointer -g") - endif () + if (SANITIZER_ADDRESS) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -O1 -fno-omit-frame-pointer -g") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -O1 -fno-omit-frame-pointer -g") + endif () - if (SANITIZER_MEMORY) - # maybe add "-fPIE -pie" here - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=memory -fno-omit-frame-pointer -g -fsanitize-memory-track-origins") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=memory -fno-omit-frame-pointer -g -fsanitize-memory-track-origins") - endif () + if (SANITIZER_MEMORY) + # maybe add "-fPIE -pie" here + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=memory -fno-omit-frame-pointer -g -fsanitize-memory-track-origins") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=memory -fno-omit-frame-pointer -g -fsanitize-memory-track-origins") + endif () endif () # SETTINGS FOR VISUAL STUDIO COMPILER if ("x${CMAKE_C_COMPILER_ID}" STREQUAL "xMSVC") - if (CMAKE_C_FLAGS MATCHES "/W[0-4]") - string(REGEX REPLACE "/W[0-4]" "/W3" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") - else () - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3") - endif () + if (CMAKE_C_FLAGS MATCHES "/W[0-4]") + string(REGEX REPLACE "/W[0-4]" "/W3" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") + else () + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3") + endif () - if (WERROR) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") - endif () + if (WERROR) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") + endif () endif () @@ -200,5 +200,5 @@ endif () add_subdirectory(usrsctplib) if (BUILD_PROGRAMS) - add_subdirectory(programs) + add_subdirectory(programs) endif () diff --git a/programs/CMakeLists.txt b/programs/CMakeLists.txt index 3026ddce..69d42431 100644 --- a/programs/CMakeLists.txt +++ b/programs/CMakeLists.txt @@ -49,11 +49,11 @@ include_directories(${CMAKE_SOURCE_DIR}/usrsctplib) ################################################# if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") - add_definitions(-D_GNU_SOURCE) + add_definitions(-D_GNU_SOURCE) endif () if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - add_definitions(-D__APPLE_USE_RFC_2292) + add_definitions(-D__APPLE_USE_RFC_2292) endif () @@ -69,31 +69,31 @@ find_package(Threads) ################################################# set(CHECK_PROGRAMS - client.c - daytime_server.c - discard_server.c - echo_server.c - ekr_client.c - ekr_loop_offload.c - ekr_loop.c - ekr_peer.c - ekr_server.c - http_client.c - rtcweb.c - test_libmgmt.c - test_timer.c - tsctp.c + client.c + daytime_server.c + discard_server.c + echo_server.c + ekr_client.c + ekr_loop_offload.c + ekr_loop.c + ekr_peer.c + ekr_server.c + http_client.c + rtcweb.c + test_libmgmt.c + test_timer.c + tsctp.c ) foreach (SOURCE_FILE ${CHECK_PROGRAMS}) - get_filename_component(SOURCE_FILE_WE ${SOURCE_FILE} NAME_WE) - add_executable( - ${SOURCE_FILE_WE} - ${SOURCE_FILE} - ) - - target_link_libraries(${SOURCE_FILE_WE} - ${PROGRAMS_LINK_LIBRARY} - ${CMAKE_THREAD_LIBS_INIT} - ) + get_filename_component(SOURCE_FILE_WE ${SOURCE_FILE} NAME_WE) + add_executable( + ${SOURCE_FILE_WE} + ${SOURCE_FILE} + ) + + target_link_libraries(${SOURCE_FILE_WE} + ${PROGRAMS_LINK_LIBRARY} + ${CMAKE_THREAD_LIBS_INIT} + ) endforeach () diff --git a/usrsctplib/CMakeLists.txt b/usrsctplib/CMakeLists.txt index a246e318..f7636d66 100644 --- a/usrsctplib/CMakeLists.txt +++ b/usrsctplib/CMakeLists.txt @@ -54,32 +54,32 @@ add_definitions(-DSCTP_PROCESS_LEVEL_LOCKS) ################################################# if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") - add_definitions(-D_GNU_SOURCE) + add_definitions(-D_GNU_SOURCE) endif () if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") - add_definitions(-U__FreeBSD__) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-address-of-packed-member -Wno-unknown-warning-option") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-address-of-packed-member -Wno-unknown-warning-option") + add_definitions(-U__FreeBSD__) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-address-of-packed-member -Wno-unknown-warning-option") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-address-of-packed-member -Wno-unknown-warning-option") endif () if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - add_definitions(-U__APPLE__) - add_definitions(-D__APPLE_USE_RFC_2292) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-address-of-packed-member -Wno-deprecated-declarations") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-address-of-packed-member -Wno-deprecated-declarations") + add_definitions(-U__APPLE__) + add_definitions(-D__APPLE_USE_RFC_2292) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-address-of-packed-member -Wno-deprecated-declarations") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-address-of-packed-member -Wno-deprecated-declarations") endif () if (${CMAKE_SYSTEM_NAME} MATCHES "DragonFly") - add_definitions(-U__DragonFly__) + add_definitions(-U__DragonFly__) endif () if (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") - add_definitions(-U__NetBSD__) + add_definitions(-U__NetBSD__) endif () if (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") - add_definitions(-U__OpenBSD__) + add_definitions(-U__OpenBSD__) endif () @@ -90,91 +90,91 @@ endif () include_directories(${CMAKE_CURRENT_SOURCE_DIR}) list(APPEND usrsctp_root_HEADERS - user_atomic.h - user_environment.h - user_inpcb.h - user_ip_icmp.h - user_ip6_var.h - user_malloc.h - user_mbuf.h - user_queue.h - user_recv_thread.h - user_route.h - user_socketvar.h - user_uma.h - usrsctp.h + user_atomic.h + user_environment.h + user_inpcb.h + user_ip_icmp.h + user_ip6_var.h + user_malloc.h + user_mbuf.h + user_queue.h + user_recv_thread.h + user_route.h + user_socketvar.h + user_uma.h + usrsctp.h ) list(APPEND usrsctp_netinet_HEADERS - netinet/sctp_asconf.h - netinet/sctp_auth.h - netinet/sctp_bsd_addr.h - netinet/sctp_callout.h - netinet/sctp_constants.h - netinet/sctp_crc32.h - netinet/sctp_header.h - netinet/sctp_indata.h - netinet/sctp_input.h - netinet/sctp_lock_userspace.h - netinet/sctp_os_userspace.h - netinet/sctp_os.h - netinet/sctp_output.h - netinet/sctp_pcb.h - netinet/sctp_peeloff.h - netinet/sctp_process_lock.h - netinet/sctp_sha1.h - netinet/sctp_structs.h - netinet/sctp_sysctl.h - netinet/sctp_timer.h - netinet/sctp_uio.h - netinet/sctp_var.h - netinet/sctputil.h - netinet/sctp.h + netinet/sctp_asconf.h + netinet/sctp_auth.h + netinet/sctp_bsd_addr.h + netinet/sctp_callout.h + netinet/sctp_constants.h + netinet/sctp_crc32.h + netinet/sctp_header.h + netinet/sctp_indata.h + netinet/sctp_input.h + netinet/sctp_lock_userspace.h + netinet/sctp_os_userspace.h + netinet/sctp_os.h + netinet/sctp_output.h + netinet/sctp_pcb.h + netinet/sctp_peeloff.h + netinet/sctp_process_lock.h + netinet/sctp_sha1.h + netinet/sctp_structs.h + netinet/sctp_sysctl.h + netinet/sctp_timer.h + netinet/sctp_uio.h + netinet/sctp_var.h + netinet/sctputil.h + netinet/sctp.h ) list(APPEND usrsctp_netinet6_HEADERS - netinet6/sctp6_var.h + netinet6/sctp6_var.h ) list(APPEND usrsctp_HEADERS - ${usrsctp_root_HEADERS} - ${usrsctp_netinet_HEADERS} - ${usrsctp_netinet6_HEADERS} + ${usrsctp_root_HEADERS} + ${usrsctp_netinet_HEADERS} + ${usrsctp_netinet6_HEADERS} ) list(APPEND usrsctp_SOURCES - netinet/sctp_asconf.c - netinet/sctp_auth.c - netinet/sctp_bsd_addr.c - netinet/sctp_callout.c - netinet/sctp_cc_functions.c - netinet/sctp_crc32.c - netinet/sctp_indata.c - netinet/sctp_input.c - netinet/sctp_output.c - netinet/sctp_pcb.c - netinet/sctp_peeloff.c - netinet/sctp_sha1.c - netinet/sctp_ss_functions.c - netinet/sctp_sysctl.c - netinet/sctp_timer.c - netinet/sctp_userspace.c - netinet/sctp_usrreq.c - netinet/sctputil.c - netinet6/sctp6_usrreq.c - user_environment.c - user_mbuf.c - user_recv_thread.c - user_socket.c + netinet/sctp_asconf.c + netinet/sctp_auth.c + netinet/sctp_bsd_addr.c + netinet/sctp_callout.c + netinet/sctp_cc_functions.c + netinet/sctp_crc32.c + netinet/sctp_indata.c + netinet/sctp_input.c + netinet/sctp_output.c + netinet/sctp_pcb.c + netinet/sctp_peeloff.c + netinet/sctp_sha1.c + netinet/sctp_ss_functions.c + netinet/sctp_sysctl.c + netinet/sctp_timer.c + netinet/sctp_userspace.c + netinet/sctp_usrreq.c + netinet/sctputil.c + netinet6/sctp6_usrreq.c + user_environment.c + user_mbuf.c + user_recv_thread.c + user_socket.c ) add_library(usrsctp SHARED ${usrsctp_SOURCES} ${usrsctp_HEADERS}) add_library(usrsctp-static STATIC ${usrsctp_SOURCES} ${usrsctp_HEADERS}) if (WIN32) - message(STATUS "link library: ws2_32") - target_link_libraries(usrsctp ws2_32) - target_link_libraries(usrsctp-static ws2_32) + message(STATUS "link library: ws2_32") + target_link_libraries(usrsctp ws2_32) + target_link_libraries(usrsctp-static ws2_32) endif () set_target_properties(usrsctp-static PROPERTIES OUTPUT_NAME "usrsctp") @@ -182,7 +182,7 @@ set_target_properties(usrsctp PROPERTIES IMPORT_SUFFIX "_import.lib") set_target_properties(usrsctp PROPERTIES SOVERSION 1 VERSION 1.0.0) if (NOT DEFINED CMAKE_INSTALL_LIBDIR) - SET(CMAKE_INSTALL_LIBDIR lib) + SET(CMAKE_INSTALL_LIBDIR lib) endif () -- cgit v1.2.3 From 396ed2a0c213786a5209733eef6be2a434a2a820 Mon Sep 17 00:00:00 2001 From: Felix Weinrank Date: Wed, 15 Nov 2017 14:17:00 +0100 Subject: cmake refactoring --- CMakeLists.txt | 174 ++++++++++++++++++++++++++++++++-------------- programs/CMakeLists.txt | 14 ++-- usrsctplib/CMakeLists.txt | 30 ++++---- 3 files changed, 145 insertions(+), 73 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b3ab989..cab433a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,8 +29,8 @@ # SUCH DAMAGE. # -cmake_minimum_required(VERSION 2.6) project(usrsctplib) +cmake_minimum_required(VERSION 2.8) # Debug build type as default if (NOT CMAKE_BUILD_TYPE) @@ -41,50 +41,50 @@ endif () include(CheckStructHasMember) include(CheckIncludeFile) include(CheckIncludeFiles) - +include(CheckCCompilerFlag) ################################################# # CHECK OPTIONS ################################################# -option(INVARIANTS "Add runtime checks" 0) -if (INVARIANTS) +option(sctp_invariants "Add runtime checks" 0) +if (sctp_invariants) add_definitions(-DINVARIANTS) endif () -option(SCTP_DEBUG "Provide debug information" 1) -if (SCTP_DEBUG) +option(sctp_debug "Provide debug information" 1) +if (sctp_debug) add_definitions(-DSCTP_DEBUG) endif () -option(INET "Support IPv4" 1) -if (INET) +option(sctp_inet "Support IPv4" 1) +if (sctp_inet) add_definitions(-DINET) endif () -option(INET6 "Support IPv6" 1) +option(sctp_inet6 "Support IPv6" 1) if (INET6) add_definitions(-DINET6) endif () -option(WERROR "Warning as error" 1) +option(sctp_werror "Warning as error" 1) -option(LINK_PROGRAMS_STATIC "Link example programs static" 0) +option(sctp_link_programs_static "Link example programs static" 0) -option(BUILD_PROGRAMS "Build example programs" 1) +option(sctp_build_programs "Build example programs" 1) -option(SANITIZER_ADDRESS "Compile with address sanitizer" 0) +option(sctp_sanitizer_address "Compile with address sanitizer" 0) -option(SANITIZER_MEMORY "Compile with memory sanitizer" 0) +option(sctp_sanitizer_memory "Compile with memory sanitizer" 0) -if (SANITIZER_ADDRESS AND SANITIZER_MEMORY) +if (sctp_sanitizer_address AND sctp_sanitizer_memory) message(FATAL_ERROR "Can not compile with both sanitizer options") endif () -if (LINK_PROGRAMS_STATIC OR WIN32) - set(PROGRAMS_LINK_LIBRARY "usrsctp-static") +if (sctp_link_programs_static OR WIN32) + set(programs_link_library "usrsctp-static") else () - set(PROGRAMS_LINK_LIBRARY "usrsctp") + set(programs_link_library "usrsctp") endif () @@ -92,28 +92,28 @@ endif () # CHECK FOR TYPES AND FUNCTIONS ################################################# -check_include_files("sys/queue.h" HAVE_SYS_QUEUE_H) -if (HAVE_SYS_QUEUE_H) +check_include_files("sys/queue.h" have_sys_queue_h) +if (have_sys_queue_h) add_definitions(-DHAVE_SYS_QUEUE_H) endif () -check_include_files("sys/socket.h;linux/if_addr.h" HAVE_LINUX_IF_ADDR_H) -if (HAVE_LINUX_IF_ADDR_H) +check_include_files("sys/socket.h;linux/if_addr.h" have_linux_if_addr_h) +if (have_linux_if_addr_h) add_definitions(-DHAVE_LINUX_IF_ADDR_H) endif () -check_include_files("sys/socket.h;linux/rtnetlink.h" HAVE_LINUX_RTNETLINK_H) -if (HAVE_LINUX_RTNETLINK_H) +check_include_files("sys/socket.h;linux/rtnetlink.h" have_linux_rtnetlink_h) +if (have_linux_rtnetlink_h) add_definitions(-DHAVE_LINUX_RTNETLINK_H) endif () -check_include_files("sys/types.h;netinet/in.h;netinet/ip.h;netinet/ip_icmp.h" HAVE_NETINET_IP_ICMP_H) -if (HAVE_NETINET_IP_ICMP_H) +check_include_files("sys/types.h;netinet/in.h;netinet/ip.h;netinet/ip_icmp.h" have_netinet_ip_icmp_h) +if (have_netinet_ip_icmp_h) add_definitions(-DHAVE_NETINET_IP_ICMP_H) endif () -check_include_files("stdatomic.h" HAVE_STDATOMIC_H) -if (HAVE_STDATOMIC_H) +check_include_files("stdatomic.h" have_stdatomic_h) +if (have_stdatomic_h) add_definitions(-DHAVE_STDATOMIC_H) endif () @@ -122,32 +122,33 @@ endif () # CHECK STRUCT MEMBERS ################################################# -set (CMAKE_REQUIRED_INCLUDES "${CMAKE_SOURCE_DIR}/usrsctplib") -check_include_file(usrsctp.h HAVE_USRSCTP_H) -if (NOT HAVE_USRSCTP_H) +set(CMAKE_REQUIRED_INCLUDES "${CMAKE_SOURCE_DIR}/usrsctplib") + +check_include_file(usrsctp.h have_usrsctp_h) +if (NOT have_usrsctp_h) message(FATAL_ERROR "usrsctp.h not found") endif () -check_struct_has_member("struct sockaddr" "sa_len" "sys/types.h;sys/socket.h" HAVE_SA_LEN) -if (HAVE_SA_LEN) - message(STATUS "HAVE_SA_LEN") +check_struct_has_member("struct sockaddr" "sa_len" "sys/types.h;sys/socket.h" have_sa_len) +if (have_sa_len) + message(STATUS "have_sa_len") add_definitions(-DHAVE_SA_LEN) endif () -check_struct_has_member("struct sockaddr_in" "sin_len" "sys/types.h;netinet/in.h" HAVE_SIN_LEN) -if (HAVE_SIN_LEN) - message(STATUS "HAVE_SIN_LEN") +check_struct_has_member("struct sockaddr_in" "sin_len" "sys/types.h;netinet/in.h" have_sin_len) +if (have_sin_len) + message(STATUS "have_sin_len") add_definitions(-DHAVE_SIN_LEN) endif () -check_struct_has_member("struct sockaddr_in6" "sin6_len" "sys/types.h;netinet/in.h" HAVE_SIN6_LEN) -if (HAVE_SIN6_LEN) - message(STATUS "HAVE_SIN6_LEN") +check_struct_has_member("struct sockaddr_in6" "sin6_len" "sys/types.h;netinet/in.h" have_sin6_len) +if (have_sin6_len) + message(STATUS "have_sin6_len") add_definitions(-DHAVE_SIN6_LEN) endif () -check_struct_has_member("struct sockaddr_conn" "sconn_len" "usrsctp.h" HAVE_SCONN_LEN) -if (HAVE_SCONN_LEN) +check_struct_has_member("struct sockaddr_conn" "sconn_len" "usrsctp.h" have_sconn_len) +if (have_sconn_len) message(STATUS "HAVE_SCONN_LEN") add_definitions(-DHAVE_SCONN_LEN) endif () @@ -159,21 +160,92 @@ endif () # SETTINGS FOR UNIX COMPILER if ("x${CMAKE_C_COMPILER_ID}" STREQUAL "xClang" OR "x${CMAKE_C_COMPILER_ID}" STREQUAL "xGNU") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -pedantic -Wall -Wextra -Wfloat-equal -Wshadow -Wpointer-arith -Winit-self -Wno-unused-function -Wno-unused-parameter") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c99 -pedantic -Wall -Wextra -Wfloat-equal -Wshadow -Wpointer-arith -Winit-self -Wno-unused-function -Wno-unused-parameter") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -pedantic -Wall -Wextra") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c99 -pedantic -Wall -Wextra") - if (WERROR) + check_c_compiler_flag(-Wfloat-equal has_wfloat_equal) + if (has_wfloat_equal) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wfloat-equal") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wfloat-equal") + endif () + + check_c_compiler_flag(-Wshadow has_wshadow) + if (has_wshadow) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wshadow") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshadow") + endif () + + check_c_compiler_flag(-Wpointer-arith has_wpointer_aritih) + if (has_wpointer_aritih) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpointer-arith") + endif () + + check_c_compiler_flag(-Wunreachable-code has_wunreachable_code) + if (has_wunreachable_code) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunreachable-code") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wunreachable-code") + endif () + + check_c_compiler_flag(-Winit-self has_winit_self) + if (has_winit_self) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Winit-self") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Winit-self") + endif () + + check_c_compiler_flag(-Wno-unused-function has_wno_unused_function) + if (has_wno_unused_function) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-function") + endif () + + check_c_compiler_flag(-Wno-unused-parameter has_wno_unused_parameter) + if (has_wno_unused_parameter) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter") + endif () + + check_c_compiler_flag(-Wno-overlength-strings has_wno_overlength_strings) + if (has_wno_overlength_strings) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-overlength-strings") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-overlength-strings") + endif () + + check_c_compiler_flag(-Wno-unused-command-line-argument has_wno_unused_command_line_argument) + if (has_wno_unused_command_line_argument) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-command-line-argument") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-command-line-argument") + endif () + + check_c_compiler_flag(-Wno-unreachable-code has_wno_unreachable_code) + if (has_wno_unreachable_code) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unreachable-code") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unreachable-code") + endif () + + check_c_compiler_flag(-Wno-parentheses-equality has_wno_parantheses_equality) + if (has_wno_parantheses_equality) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-parentheses-equality") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-parentheses-equality") + endif () + + check_c_compiler_flag(-Wno-array-bounds has_wno_array_bounds) + if (has_wno_array_bounds) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-array-bounds") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-array-bounds") + endif () + + if (sctp_werror) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") endif () - if (SANITIZER_ADDRESS) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -O1 -fno-omit-frame-pointer -g") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -O1 -fno-omit-frame-pointer -g") + if (sctp_sanitizer_address) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer -g") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer -g") endif () - if (SANITIZER_MEMORY) - # maybe add "-fPIE -pie" here + if (sctp_sanitizer_memory) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=memory -fno-omit-frame-pointer -g -fsanitize-memory-track-origins") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=memory -fno-omit-frame-pointer -g -fsanitize-memory-track-origins") endif () @@ -199,6 +271,6 @@ endif () add_subdirectory(usrsctplib) -if (BUILD_PROGRAMS) +if (sctp_build_programs) add_subdirectory(programs) endif () diff --git a/programs/CMakeLists.txt b/programs/CMakeLists.txt index 69d42431..ab4c7fda 100644 --- a/programs/CMakeLists.txt +++ b/programs/CMakeLists.txt @@ -68,7 +68,7 @@ find_package(Threads) # PROGRAMS ################################################# -set(CHECK_PROGRAMS +set(check_programs client.c daytime_server.c discard_server.c @@ -85,15 +85,15 @@ set(CHECK_PROGRAMS tsctp.c ) -foreach (SOURCE_FILE ${CHECK_PROGRAMS}) - get_filename_component(SOURCE_FILE_WE ${SOURCE_FILE} NAME_WE) +foreach (source_file ${check_programs}) + get_filename_component(source_file_we ${source_file} NAME_WE) add_executable( - ${SOURCE_FILE_WE} - ${SOURCE_FILE} + ${source_file_we} + ${source_file} ) - target_link_libraries(${SOURCE_FILE_WE} - ${PROGRAMS_LINK_LIBRARY} + target_link_libraries(${source_file_we} + ${programs_link_library} ${CMAKE_THREAD_LIBS_INIT} ) endforeach () diff --git a/usrsctplib/CMakeLists.txt b/usrsctplib/CMakeLists.txt index f7636d66..480e94ed 100644 --- a/usrsctplib/CMakeLists.txt +++ b/usrsctplib/CMakeLists.txt @@ -36,12 +36,12 @@ set(VERSION "1.0.0") -set(prefix ${CMAKE_INSTALL_PREFIX}) -set(exec_prefix "\${prefix}") -set(libdir "\${exec_prefix}/lib") -set(includedir "\${prefix}/include/usrsctp") +set(prefix ${CMAKE_INSTALL_PREFIX}) +set(exec_prefix ${prefix}) +set(libdir ${exec_prefix}/lib) +set(includedir ${prefix}/include/usrsctp) set(CMAKE_REQUIRED_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}) -set(CMAKE_MACOSX_RPATH 1) +set(CMAKE_MACOSX_RPATH 1) add_definitions(-D__Userspace__) add_definitions(-D__Userspace_os_${CMAKE_SYSTEM_NAME}) @@ -89,7 +89,7 @@ endif () include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -list(APPEND usrsctp_root_HEADERS +list(APPEND usrsctp_root_headers user_atomic.h user_environment.h user_inpcb.h @@ -105,7 +105,7 @@ list(APPEND usrsctp_root_HEADERS usrsctp.h ) -list(APPEND usrsctp_netinet_HEADERS +list(APPEND usrsctp_netinet_headers netinet/sctp_asconf.h netinet/sctp_auth.h netinet/sctp_bsd_addr.h @@ -132,17 +132,17 @@ list(APPEND usrsctp_netinet_HEADERS netinet/sctp.h ) -list(APPEND usrsctp_netinet6_HEADERS +list(APPEND usrsctp_netinet6_headers netinet6/sctp6_var.h ) -list(APPEND usrsctp_HEADERS - ${usrsctp_root_HEADERS} - ${usrsctp_netinet_HEADERS} - ${usrsctp_netinet6_HEADERS} +list(APPEND usrsctp_headers + ${usrsctp_root_headers} + ${usrsctp_netinet_headers} + ${usrsctp_netinet6_headers} ) -list(APPEND usrsctp_SOURCES +list(APPEND usrsctp_sources netinet/sctp_asconf.c netinet/sctp_auth.c netinet/sctp_bsd_addr.c @@ -168,8 +168,8 @@ list(APPEND usrsctp_SOURCES user_socket.c ) -add_library(usrsctp SHARED ${usrsctp_SOURCES} ${usrsctp_HEADERS}) -add_library(usrsctp-static STATIC ${usrsctp_SOURCES} ${usrsctp_HEADERS}) +add_library(usrsctp SHARED ${usrsctp_sources} ${usrsctp_headers}) +add_library(usrsctp-static STATIC ${usrsctp_sources} ${usrsctp_headers}) if (WIN32) message(STATUS "link library: ws2_32") -- cgit v1.2.3 From 2230605ec38d52c0aa418b318ccc14a262809ec3 Mon Sep 17 00:00:00 2001 From: Felix Weinrank Date: Wed, 15 Nov 2017 14:33:14 +0100 Subject: Fix typos --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cab433a6..d55aa039 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,11 +63,11 @@ if (sctp_inet) endif () option(sctp_inet6 "Support IPv6" 1) -if (INET6) +if (sctp_inet6) add_definitions(-DINET6) endif () -option(sctp_werror "Warning as error" 1) +option(sctp_werror "Thread warning as error" 1) option(sctp_link_programs_static "Link example programs static" 0) -- cgit v1.2.3 From abe2d8e2a298a88d011e16e8171a4ce8c0f7b83a Mon Sep 17 00:00:00 2001 From: Felix Weinrank Date: Wed, 15 Nov 2017 14:33:41 +0100 Subject: Compiler flags test --- CMakeLists.txt | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d55aa039..6e9766db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -193,48 +193,6 @@ if ("x${CMAKE_C_COMPILER_ID}" STREQUAL "xClang" OR "x${CMAKE_C_COMPILER_ID}" STR set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Winit-self") endif () - check_c_compiler_flag(-Wno-unused-function has_wno_unused_function) - if (has_wno_unused_function) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-function") - endif () - - check_c_compiler_flag(-Wno-unused-parameter has_wno_unused_parameter) - if (has_wno_unused_parameter) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter") - endif () - - check_c_compiler_flag(-Wno-overlength-strings has_wno_overlength_strings) - if (has_wno_overlength_strings) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-overlength-strings") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-overlength-strings") - endif () - - check_c_compiler_flag(-Wno-unused-command-line-argument has_wno_unused_command_line_argument) - if (has_wno_unused_command_line_argument) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-command-line-argument") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-command-line-argument") - endif () - - check_c_compiler_flag(-Wno-unreachable-code has_wno_unreachable_code) - if (has_wno_unreachable_code) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unreachable-code") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unreachable-code") - endif () - - check_c_compiler_flag(-Wno-parentheses-equality has_wno_parantheses_equality) - if (has_wno_parantheses_equality) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-parentheses-equality") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-parentheses-equality") - endif () - - check_c_compiler_flag(-Wno-array-bounds has_wno_array_bounds) - if (has_wno_array_bounds) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-array-bounds") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-array-bounds") - endif () - if (sctp_werror) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") -- cgit v1.2.3 From 41fbcc18129e927da0c5fe641530c12264e38fea Mon Sep 17 00:00:00 2001 From: Felix Weinrank Date: Wed, 15 Nov 2017 14:48:32 +0100 Subject: Compiler flags test --- CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e9766db..cfb35173 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -193,6 +193,18 @@ if ("x${CMAKE_C_COMPILER_ID}" STREQUAL "xClang" OR "x${CMAKE_C_COMPILER_ID}" STR set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Winit-self") endif () + check_c_compiler_flag(-Wno-unused-function has_wno_unused_function) + if (has_wno_unused_function) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-function") + endif () + + check_c_compiler_flag(-Wno-unused-parameter has_wno_unused_parameter) + if (has_wno_unused_parameter) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter") + endif () + if (sctp_werror) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") -- cgit v1.2.3 From 975586603e903ef3b1896bb339a7ded7b40817a0 Mon Sep 17 00:00:00 2001 From: Felix Weinrank Date: Wed, 15 Nov 2017 14:52:15 +0100 Subject: Compiler flags test --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index cfb35173..80fc69ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -205,6 +205,12 @@ if ("x${CMAKE_C_COMPILER_ID}" STREQUAL "xClang" OR "x${CMAKE_C_COMPILER_ID}" STR set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter") endif () + check_c_compiler_flag(-Wno-unreachable-code has_wno_unreachable_code) + if (has_wno_unreachable_code) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unreachable-code") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unreachable-code") + endif () + if (sctp_werror) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") -- cgit v1.2.3 From c0072cdbd17d1d981171497738a13fe68595c5e2 Mon Sep 17 00:00:00 2001 From: Felix Weinrank Date: Wed, 15 Nov 2017 14:55:32 +0100 Subject: Buildbot test: optimization level --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 80fc69ea..08521504 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -160,8 +160,8 @@ endif () # SETTINGS FOR UNIX COMPILER if ("x${CMAKE_C_COMPILER_ID}" STREQUAL "xClang" OR "x${CMAKE_C_COMPILER_ID}" STREQUAL "xGNU") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -pedantic -Wall -Wextra") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c99 -pedantic -Wall -Wextra") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -pedantic -Wall -Wextra -O2") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c99 -pedantic -Wall -Wextra -O2") check_c_compiler_flag(-Wfloat-equal has_wfloat_equal) if (has_wfloat_equal) -- cgit v1.2.3 From a0ccbeef9a832b35c30e73208eb09e5ad83a9fab Mon Sep 17 00:00:00 2001 From: Felix Weinrank Date: Thu, 16 Nov 2017 15:06:23 +0100 Subject: CMake tests --- CMakeLists.txt | 8 ++++---- usrsctplib/CMakeLists.txt | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 08521504..1ebfcb39 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ # project(usrsctplib) -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.0) # Debug build type as default if (NOT CMAKE_BUILD_TYPE) @@ -159,9 +159,9 @@ endif () ################################################# # SETTINGS FOR UNIX COMPILER -if ("x${CMAKE_C_COMPILER_ID}" STREQUAL "xClang" OR "x${CMAKE_C_COMPILER_ID}" STREQUAL "xGNU") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -pedantic -Wall -Wextra -O2") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c99 -pedantic -Wall -Wextra -O2") +if ("${CMAKE_C_COMPILER_ID}" MATCHES "Clang" OR "${CMAKE_C_COMPILER_ID}" MATCHES "AppleClang" OR "${CMAKE_C_COMPILER_ID}" MATCHES "GNU") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -pedantic -Wall -Wextra") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c99 -pedantic -Wall -Wextra") check_c_compiler_flag(-Wfloat-equal has_wfloat_equal) if (has_wfloat_equal) diff --git a/usrsctplib/CMakeLists.txt b/usrsctplib/CMakeLists.txt index 480e94ed..c5b72296 100644 --- a/usrsctplib/CMakeLists.txt +++ b/usrsctplib/CMakeLists.txt @@ -59,8 +59,8 @@ endif () if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") add_definitions(-U__FreeBSD__) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-address-of-packed-member -Wno-unknown-warning-option") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-address-of-packed-member -Wno-unknown-warning-option") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-address-of-packed-member") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-address-of-packed-member") endif () if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") -- cgit v1.2.3