summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmake/Modules/DefineCompilerFlags.cmake2
-rw-r--r--src/CMakeLists.txt6
2 files changed, 7 insertions, 1 deletions
diff --git a/cmake/Modules/DefineCompilerFlags.cmake b/cmake/Modules/DefineCompilerFlags.cmake
index 0ab8802..e522a6a 100644
--- a/cmake/Modules/DefineCompilerFlags.cmake
+++ b/cmake/Modules/DefineCompilerFlags.cmake
@@ -10,7 +10,7 @@ if (UNIX AND NOT WIN32)
if (${CMAKE_C_COMPILER_ID} MATCHES "(GNU|Clang)")
# add -Wconversion ?
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -pedantic -pedantic-errors")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow -Wmissing-prototypes -Wdeclaration-after-statement")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused -Wfloat-equal -Wpointer-arith -Wwrite-strings -Wformat-security")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-format-attribute")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 95a691f..b1ab95f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,6 +1,12 @@
project(libsocket_wrapper C)
include_directories(${CMAKE_BINARY_DIR})
+
+set_source_files_properties(socket_wrapper.c
+ PROPERTIES
+ COMPILE_DEFINITIONS
+ _GNU_SOURCE)
+
add_library(socket_wrapper SHARED socket_wrapper.c)
target_link_libraries(socket_wrapper ${SWRAP_REQUIRED_LIBRARIES})