-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
31 lines (24 loc) · 892 Bytes
/
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
PROJECT(gfp)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET(CMAKE_THREAD_PREFER_PTHREAD TRUE)
INCLUDE(CheckCXXCompilerFlag REQUIRED)
INCLUDE(FindThreads REQUIRED)
INCLUDE(CMakeDependentOption REQUIRED)
IF(NOT MSVC)
CHECK_CXX_COMPILER_FLAG("-std=c++11" FLAGS_SUPPORT_CXX11)
IF(FLAGS_SUPPORT_CXX11)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wc++11-compat")
MESSAGE(STATUS "Found C++11 support.")
ELSE(FLAGS_SUPPORT_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" FLAGS_SUPPORT_CXX0X)
IF(FLAGS_SUPPORT_CXX0X)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Wc++0x-compat")
MESSAGE(STATUS "Found C++0x support.")
ELSE(FLAGS_SUPPORT_CXX0X)
MESSAGE(SEND_ERROR "No C++0x support.")
ENDIF(FLAGS_SUPPORT_CXX0X)
ENDIF(FLAGS_SUPPORT_CXX11)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra")
ENDIF(NOT MSVC)
ADD_SUBDIRECTORY(data)
ADD_SUBDIRECTORY(src)