-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakelists.txt
37 lines (27 loc) · 933 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
32
33
34
35
36
37
cmake_minimum_required(VERSION 2.8)
project(NonoSTL CXX C)
set(CXX_FLAGS
-g
-Wall
-Wextra
-Werror
-std=c++11
)
# ---[ Flags
string(REPLACE ";" " " CMAKE_CXX_FLAGS "${CXX_FLAGS}")
# ---[ Includes
set(NANO_STL_THIRD_PARTY_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/third_party)
set(NANO_STL_GMOCK_INCLUDE_DIR ${NANO_STL_THIRD_PARTY_INCLUDE_DIR}/gmock)
include_directories(${PROJECT_SOURCE_DIR}/src)
include_directories(${NANO_STL_GMOCK_INCLUDE_DIR})
# ---[ Dependencies
find_package(Threads REQUIRED)
# --[ Output directory
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# ---[ Subdirectories
add_subdirectory(test)
message(STATUS "CMAKE_CXX_FLAGS=" "${CMAKE_CXX_FLAGS}")
message(STATUS "PROJECT_BINARY_DIR=" "${PROJECT_BINARY_DIR}")
message(STATUS "PROJECT_SOURCE_DIR=" "${PROJECT_SOURCE_DIR}")