-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
55 lines (47 loc) · 1.6 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
cmake_minimum_required(VERSION 2.8.12) # version provided by Ubuntu 14.04
if(((NOT CMAKE_BUILD_TYPE) OR (CMAKE_BUILD_TYPE STREQUAL "Debug")) AND (NOT CMAKE_GENERATOR STREQUAL "Xcode"))
set(install_prefix_suffix "-debug")
else()
set(install_prefix_suffix "")
endif()
set(
CMAKE_INSTALL_PREFIX
"${CMAKE_CURRENT_BINARY_DIR}/../bin-smartsqlite${install_prefix_suffix}"
CACHE PATH "destination for make install"
)
if(NOT ("${CMAKE_VERSION}" VERSION_LESS "3.1"))
set(CMAKE_INSTALL_MESSAGE LAZY
CACHE STRING "Show messages during install? Lazy means only changed.")
set_property(CACHE CMAKE_INSTALL_MESSAGE
PROPERTY STRINGS "ALWAYS" "LAZY" "NEVER")
endif()
project(smartsqlite)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
include(CompilerSettings)
# Google Mock / Google Test
add_subdirectory("lib/gmock")
include_directories("${gmock_SOURCE_DIR}/include" "${gtest_SOURCE_DIR}/include")
if(CMAKE_CXX_COMPILER_ID STREQUAL Clang)
foreach(target gtest gtest_main gmock gmock_main)
target_compile_options(${target}
PUBLIC
-Wno-deprecated
-Wno-float-equal
-Wno-missing-noreturn
-Wno-shift-sign-overflow
-Wno-undef
-Wno-used-but-marked-unused
PRIVATE
-w
)
endforeach()
endif()
find_package(botan
NO_MODULE
PATHS "${CMAKE_CURRENT_BINARY_DIR}/../bin-botan${install_prefix_suffix}"
NO_DEFAULT_PATH
)
add_subdirectory("src")
add_subdirectory("test")
enable_testing()
add_test(all_tests test/${PROJECT_NAME}_tests)