forked from orwell-int/server-game
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
34 lines (27 loc) · 1.11 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Root's CMakeFile
cmake_minimum_required(VERSION 2.8.10)
# Use our own modules along with the CMake's ones
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/modules/")
project(orwell)
# Initialize CXXFLAGS.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-O4 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
# Compiler-specific C++11 activation.
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
execute_process(
COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (NOT (GCC_VERSION VERSION_EQUAL 4.8))
message(FATAL_ERROR "${PROJECT_NAME} requires g++ 4.8.")
endif ()
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
message(WARNING "You're compiling with Clang, not with g++")
else ()
message(FATAL_ERROR "Your C++ compiler does not support C++11.")
endif ()
# Communication module, containing Protobuf messages and simple library to play with them
add_subdirectory(com)
# Tasks module
add_subdirectory(tasks)