forked from juzzlin/SimpleLogger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
38 lines (26 loc) · 1018 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
project(SimpleLogger)
cmake_minimum_required(VERSION 2.8.12)
cmake_policy(VERSION 2.8.12)
option(SIMPLE_LOGGER_BUILD_SHARED_LIB "Build a shared library" OFF)
set(VERSION_MAJOR "1")
set(VERSION_MINOR "3")
set(VERSION_PATCH "1")
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
enable_testing()
# Default to release C++ flags if CMAKE_BUILD_TYPE not set
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo
MinSizeRel." FORCE)
endif()
set(CMAKE_CXX_STANDARD 11)
if(CMAKE_COMPILER_IS_GNUCXX OR MINGW OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic")
# CMAKE_CXX_STANDARD supported only by versions >= 3.1
if (CMAKE_VERSION VERSION_LESS "3.1")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
endif ()
endif()
set(LIBRARY_NAME "SimpleLogger")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
add_subdirectory(src)