diff options
author | irungentoo <irungentoo@gmail.com> | 2013-06-26 03:54:17 -0700 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-06-26 03:54:17 -0700 |
commit | 68d2995bce43bc1f52ac25ca52e0897baef8d111 (patch) | |
tree | 94ccfed84866dd5f49488f78c0069004a43af2e4 | |
parent | f45e3c29a764d6425ced4813855a89a1c4309382 (diff) | |
parent | c2ad80431be6450f6bd2fbed3b5eb512fc021527 (diff) |
Merge pull request #14 from nurupo/master
Added warnings for GCC
-rw-r--r-- | CMakeLists.txt | 16 |
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 @@ | |||
1 | cmake_minimum_required(VERSION 2.6.0) | 1 | cmake_minimum_required(VERSION 2.6.0) |
2 | project(TOX) | 2 | project(TOX C) |
3 | 3 | ||
4 | set(core_sources | 4 | set(core_sources |
5 | core/DHT.c) | 5 | core/DHT.c) |
6 | 6 | ||
7 | set(test_sources | 7 | set(test_sources |
8 | testing/DHT_test.c) | 8 | testing/DHT_test.c) |
9 | |||
10 | set(exe_name TOX-app) | ||
9 | 11 | ||
10 | add_executable(TOX-app | 12 | add_executable(${exe_name} |
11 | ${core_sources} | 13 | ${core_sources} |
12 | ${test_sources}) | 14 | ${test_sources}) |
13 | 15 | ||
14 | |||
15 | if(WIN32) | 16 | if(WIN32) |
16 | target_link_libraries(TOX-app ws2_32) | 17 | target_link_libraries(${exe_name} ws2_32) |
17 | endif(WIN32) \ No newline at end of file | 18 | endif() |
19 | |||
20 | if(CMAKE_COMPILER_IS_GNUCC) | ||
21 | message(STATUS "==== GCC detected - Adding compiler flags") | ||
22 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror") | ||
23 | endif() \ No newline at end of file | ||