summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Biro <nurupo.contributions@gmail.com>2013-06-26 01:03:35 -0400
committerMaxim Biro <nurupo.contributions@gmail.com>2013-06-26 02:16:38 -0400
commitc2ad80431be6450f6bd2fbed3b5eb512fc021527 (patch)
tree94ccfed84866dd5f49488f78c0069004a43af2e4
parentf45e3c29a764d6425ced4813855a89a1c4309382 (diff)
Added warnings for GCC
-rw-r--r--CMakeLists.txt16
1 files changed, 11 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 26f56e4c..c1fa8cad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,17 +1,23 @@
1cmake_minimum_required(VERSION 2.6.0) 1cmake_minimum_required(VERSION 2.6.0)
2project(TOX) 2project(TOX C)
3 3
4set(core_sources 4set(core_sources
5 core/DHT.c) 5 core/DHT.c)
6 6
7set(test_sources 7set(test_sources
8 testing/DHT_test.c) 8 testing/DHT_test.c)
9
10set(exe_name TOX-app)
9 11
10add_executable(TOX-app 12add_executable(${exe_name}
11 ${core_sources} 13 ${core_sources}
12 ${test_sources}) 14 ${test_sources})
13 15
14
15if(WIN32) 16if(WIN32)
16 target_link_libraries(TOX-app ws2_32) 17 target_link_libraries(${exe_name} ws2_32)
17endif(WIN32) \ No newline at end of file 18endif()
19
20if(CMAKE_COMPILER_IS_GNUCC)
21 message(STATUS "==== GCC detected - Adding compiler flags")
22 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror")
23endif() \ No newline at end of file