forked from qoollo/simple-cpp-router
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
26 lines (22 loc) · 736 Bytes
/
CMakeLists.txt
File metadata and controls
26 lines (22 loc) · 736 Bytes
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
cmake_minimum_required(VERSION 2.8)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CLANG true)
message("using Clang")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
add_definitions("-std=c++11")
add_definitions("-stdlib=libc++")
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(GCC true)
# using GCC
set(CMAKE_CXX_FLAGS "-std=gnu++11 -fPIC")
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
# using Intel C++
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# using Visual Studio C++
set(MSVC true)
endif()
enable_testing()
add_subdirectory(src)
add_subdirectory(external/googletest)
add_subdirectory(tests)