-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
56 lines (35 loc) · 1.16 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
56
cmake_minimum_required(VERSION 3.8.2)
#include(CTest)
set(BUILD_TESTING ON)
option(BUILD_TEST_WITH_ALL "build test with target ALL" ON)
option(RUN_TEST_AFTER_BUILD "run test after build" ON)
if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
message(FATAL_ERROR "In-source builds not allowed." )
endif()
# set output directory for all executable modules
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_PDB_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
#set(BUILD_SHARED_LIBS ON)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RelWithDbgInfo)
endif()
string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
#---
include(CMake_ExnternalIncludes.txt OPTIONAL)
include(CMake_Additional.txt OPTIONAL)
#---
if (UNIX)
include_directories(/usr/local/include)
elseif (WIN32)
add_definitions(-DGTEST_LANG_CXX11)
endif()
if (BUILD_TESTING)
enable_testing()
endif()
add_subdirectory(src)
#include(SourceCollector)
#AddSubDirectoryIfMakeFileExist(${CMAKE_CURRENT_SOURCE_DIR}/external)