-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
67 lines (58 loc) · 2.38 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
57
58
59
60
61
62
63
64
65
66
67
cmake_minimum_required(VERSION 2.8...3.13)
set (CMAKE_CXX_STANDARD 20)
set(PROJECT_NAME TableLab)
project(${PROJECT_NAME})
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Configs" FORCE)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE})
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
enable_testing()
include(FetchContent)
FetchContent_Declare(
googletest
# Specify the commit you depend on and update it regularly.
URL https://github.com/google/googletest/archive/5376968f6948923e2411081fd9372e71a59d8e77.zip
)
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
set_target_properties(gtest PROPERTIES FOLDER 3rdparty/${nameBaseProj})
set_target_properties(gtest_main PROPERTIES FOLDER 3rdparty/${nameBaseProj})
set_target_properties(gmock PROPERTIES FOLDER 3rdparty/${nameBaseProj})
set_target_properties(gmock_main PROPERTIES FOLDER 3rdparty/${nameBaseProj})
add_subdirectory(polinom)
add_subdirectory(postfix)
add_subdirectory(table)
set(nameMain "Main")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS /ENTRY:${nameMain}")
file(GLOB hdrs "interface/include/*.h*" "interface/src/*.h*")
file(GLOB srcs "*.cpp" "interface/src/*.cpp")
file(GLOB resx "interface/include/*.resx")
add_executable(${PROJECT_NAME} WIN32 ${srcs} ${hdrs} ${resx})
set_target_properties(${PROJECT_NAME} PROPERTIES
VS_DOTNET_REFERENCES "System;System.Data;System.Drawing;System.Windows.Forms;System.Xml"
VS_GLOBAL_ROOTNAMESPACE ${PROJECT_NAME}
COMMON_LANGUAGE_RUNTIME ""
CMAKE_VS_TARGET_FRAMEWORK_VERSION "v4.7.2"
)
target_include_directories(${PROJECT_NAME} PRIVATE
"interface/include"
"polinom/include"
"postfix/include"
"postfix/stack/include"
"table/OrderedTable/include"
"table/Table/include"
"table/VectorTable/include"
"table/ListTable/include"
"table/TreeTable/include"
"table/RedBlackTreeTable/include"
"table/AVLTreeTable/include"
"table/HashTable/include"
"table/ChainHashTable/include"
"table/RepeatMixingTable/include"
)