Skip to content

Commit

Permalink
Added -Wno-error=format-truncation to usrsctp compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
paullouisageneau committed Mar 24, 2020
1 parent 3b15363 commit 345e7ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

add_subdirectory(deps/usrsctp EXCLUDE_FROM_ALL)
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
target_compile_options(usrsctp PRIVATE -Wno-error=format-truncation)
target_compile_options(usrsctp-static PRIVATE -Wno-error=format-truncation)
endif()
add_library(Usrsctp::Usrsctp ALIAS usrsctp)
add_library(Usrsctp::UsrsctpStatic ALIAS usrsctp-static)

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CXX=$(CROSS)g++
AR=$(CROSS)ar
RM=rm -f
CXXFLAGS=-std=c++17
CPPFLAGS=-O2 -pthread -fPIC -Wall -Wno-address-of-packed-member
CPPFLAGS=-O2 -pthread -fPIC -Wall
LDFLAGS=-pthread
LIBS=
LOCALLIBS=libusrsctp.a
Expand Down Expand Up @@ -86,7 +86,7 @@ dist-clean: clean
libusrsctp.a:
cd $(USRSCTP_DIR) && \
./bootstrap && \
./configure --enable-static --disable-debug CFLAGS="$(CPPFLAGS)" && \
./configure --enable-static --disable-debug CFLAGS="$(CPPFLAGS) -Wno-error=format-truncation" && \
make
cp $(USRSCTP_DIR)/usrsctplib/.libs/libusrsctp.a .

Expand Down

0 comments on commit 345e7ee

Please sign in to comment.