-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
25 lines (21 loc) · 1.02 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
cmake_minimum_required (VERSION 2.8.11)
project (ProjectName)
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wpedantic -Wextra -Wunused-value -Wunused-function -Wunused-variable -Wswitch")
SET(CMAKE_CXX_FLAGS_DEBUG "-g -fno-omit-frame-pointer -fsanitize=address")
SET(CMAKE_CXX_FLAGS_RELEASE "-g -O3")
ELSEIF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x -Wall -Wpedantic -Wextra -Wunused-value -Wunused-function -Wunused-variable -Wswitch")
SET(CMAKE_CXX_FLAGS_DEBUG "-g -fno-omit-frame-pointer")
SET(CMAKE_CXX_FLAGS_RELEASE "-O3")
ELSEIF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
SET(CMAKE_CXX_FLAGS "/W4 /EHsc")
SET(CMAKE_CXX_FLAGS_DEBUG "/MTd /Od /Zi")
SET(CMAKE_CXX_FLAGS_RELEASE "/MT /O2")
SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)
ENDIF()
include_directories(include)
add_subdirectory(3rdParty)
add_subdirectory(src)
add_subdirectory(test)
add_subdirectory(benchmark)