aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-06-16 17:03:18 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-06-16 17:03:18 +0200
commit7160b701f0e930c807179306c147fd786775ec76 (patch)
tree5204e17e7e9756b23e6dd6aa7783bf916309e003
parent333091f78934d55b7b6458c575d8f23f364636c8 (diff)
downloadmarkov-k-ram-7160b701f0e930c807179306c147fd786775ec76.zip
markov-k-ram-7160b701f0e930c807179306c147fd786775ec76.tar.bz2
Takes $CFLAGS into consideration + fix retries
-rw-r--r--CMakeLists.txt7
-rw-r--r--src/server/server.c1
2 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a6ab099..4ac9795 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,11 +8,14 @@ add_subdirectory(src)
add_definitions(-D_POSIX_SOURCE)
add_definitions(-D_POSIX_C_SOURCE=200809L)
+set(CMAKE_C_FLAGS $ENV{CFLAGS})
if(CMAKE_COMPILER_IS_GNUCC)
- set(CMAKE_C_FLAGS "-g -Wall -Wpedantic -Wconversion")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -Wpedantic -Wconversion")
message(STATUS "GNUCC detected. Adding '-O3' parameter.")
- set(CMAKE_C_FLAGS "-O3")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
endif()
+message(STATUS "CFLAGS=${CMAKE_C_FLAGS}")
+
# ${SRC_FILES} is recursively defined in the subdirectories.
# Each subdirectory only adds the source files that are present at its level.
diff --git a/src/server/server.c b/src/server/server.c
index 8a72bab..640584f 100644
--- a/src/server/server.c
+++ b/src/server/server.c
@@ -14,6 +14,7 @@ int JH_server_main
struct JH_server server;
JH_index retries;
+ retries = 0;
/* TODO
if (JH_server_set_signal_handlers < 0)
{