diff options
-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 | ||