File tree Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,22 @@ add_subdirectory(utils)
8
8
9
9
set (UMF_LIBS umf_utils )
10
10
11
+ set (BA_SOURCES
12
+ ${CMAKE_CURRENT_SOURCE_DIR} /base_alloc/base_alloc.c
13
+ ${CMAKE_CURRENT_SOURCE_DIR} /base_alloc/base_alloc_linear.c )
14
+
15
+ if (LINUX )
16
+ set (BA_SOURCES ${BA_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR} /base_alloc/base_alloc_linux.c )
17
+ elseif (WINDOWS )
18
+ set (BA_SOURCES ${BA_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR} /base_alloc/base_alloc_windows.c )
19
+ elseif (MACOSX )
20
+ set (BA_SOURCES ${BA_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR} /base_alloc/base_alloc_linux.c )
21
+ endif ()
22
+
23
+ set (BA_SOURCES ${BA_SOURCES} PARENT_SCOPE )
24
+
11
25
set (UMF_SOURCES
12
- base_alloc/base_alloc.c
13
- base_alloc/base_alloc_linear.c
26
+ ${BA_SOURCES}
14
27
memory_pool.c
15
28
memory_provider.c
16
29
memory_provider_get_last_failed.c
@@ -21,17 +34,14 @@ set(UMF_SOURCES
21
34
)
22
35
23
36
set (UMF_SOURCES_LINUX
24
- base_alloc/base_alloc_linux.c
25
37
provider/provider_tracking_linux.c
26
38
)
27
39
28
40
set (UMF_SOURCES_WINDOWS
29
- base_alloc/base_alloc_windows.c
30
41
provider/provider_tracking_windows.c
31
42
)
32
43
33
44
set (UMF_SOURCES_MACOSX
34
- base_alloc/base_alloc_linux.c
35
45
provider/provider_tracking_linux.c
36
46
)
37
47
Original file line number Diff line number Diff line change @@ -115,9 +115,9 @@ endif()
115
115
if (LINUX )
116
116
# the base_alloc test uses linux pthreads
117
117
add_umf_test (NAME base_alloc
118
- SRCS test_base_alloc.c
118
+ SRCS ${BA_SOURCES} test_base_alloc.c
119
119
LIBS umf_utils )
120
120
add_umf_test (NAME base_alloc_linear
121
- SRCS test_base_alloc_linear.c
121
+ SRCS ${BA_SOURCES} test_base_alloc_linear.c
122
122
LIBS umf_utils )
123
123
endif ()
You can’t perform that action at this time.
0 commit comments