forked from CSE-625-Fall-2026/UsingMatrixClass
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
59 lines (49 loc) · 1.46 KB
/
Copy pathCMakeLists.txt
File metadata and controls
59 lines (49 loc) · 1.46 KB
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
cmake_minimum_required(VERSION 3.16)
project(UsingMatrixClass VERSION 3.0.0 LANGUAGES CXX)
if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
set(
CMAKE_BUILD_TYPE Debug
CACHE STRING "Choose the build type."
FORCE
)
set_property(
CACHE CMAKE_BUILD_TYPE
PROPERTY STRINGS Debug Release RelWithDebInfo MinSizeRel
)
endif()
include(CTest)
include(FetchContent)
FetchContent_Declare(
CustomMemoryAllocator
GIT_REPOSITORY https://github.com/CSE-625-Fall-2026/CustomMemoryAllocator.git
GIT_TAG v1.0.0
GIT_SHALLOW TRUE
)
FetchContent_Declare(
MatrixClassDemo
GIT_REPOSITORY https://github.com/CSE-625-Fall-2026/MatrixClassDemo.git
GIT_TAG v2.0.0
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(CustomMemoryAllocator MatrixClassDemo)
add_executable(using_matrix_class src/main.cpp)
target_link_libraries(
using_matrix_class
PRIVATE
MatrixClassDemo::matrix
CustomMemoryAllocator::global_new
)
add_executable(regular_new src/regular_new.cpp)
target_link_libraries(regular_new PRIVATE MatrixClassDemo::matrix)
add_executable(overloaded_new src/overloaded_new.cpp)
target_link_libraries(
overloaded_new
PRIVATE
MatrixClassDemo::matrix
CustomMemoryAllocator::global_new
)
if(BUILD_TESTING)
add_test(NAME regular_new_benchmark COMMAND regular_new 3)
add_test(NAME overloaded_new_benchmark COMMAND overloaded_new 3)
add_subdirectory(test)
endif()