File tree Expand file tree Collapse file tree 9 files changed +19
-10
lines changed Expand file tree Collapse file tree 9 files changed +19
-10
lines changed Original file line number Diff line number Diff line change 35
35
message (FATAL_ERROR "Unknown OS type" )
36
36
endif ()
37
37
38
+ # needed when UMF is used as an external project
39
+ set (UMF_CMAKE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} )
40
+
38
41
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /lib )
39
42
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /lib )
40
43
set (CMAKE_UMF_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /bin )
Original file line number Diff line number Diff line change 8
8
9
9
add_executable (ubench ubench.c )
10
10
add_dependencies (ubench unified_memory_framework )
11
- target_include_directories (ubench PRIVATE .. /include/ )
11
+ target_include_directories (ubench PRIVATE ${UMF_CMAKE_SOURCE_DIR} /include/ )
12
12
target_link_libraries (ubench
13
13
unified_memory_framework
14
14
numa
Original file line number Diff line number Diff line change @@ -82,8 +82,8 @@ endfunction()
82
82
function (add_umf_library name )
83
83
add_library (${name} ${ARGN} )
84
84
target_include_directories (${name} PRIVATE
85
- ${CMAKE_SOURCE_DIR } /include
86
- ${CMAKE_SOURCE_DIR } /src/common )
85
+ ${UMF_CMAKE_SOURCE_DIR } /include
86
+ ${UMF_CMAKE_SOURCE_DIR } /src/common )
87
87
add_umf_target_compile_options (${name} )
88
88
add_umf_target_link_options (${name} )
89
89
endfunction ()
Original file line number Diff line number Diff line change 2
2
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
3
3
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
4
5
- include (.. /cmake/helpers.cmake )
5
+ include (${UMF_CMAKE_SOURCE_DIR} /cmake/helpers.cmake )
6
6
7
7
set (UMF_SOURCES
8
8
memory_pool.c
@@ -54,7 +54,12 @@ endif()
54
54
55
55
add_library (${PROJECT_NAME} ::unified_memory_framework ALIAS unified_memory_framework )
56
56
57
- target_include_directories (unified_memory_framework PUBLIC ../include ./common ./provider ./critnib )
57
+ target_include_directories (unified_memory_framework PUBLIC
58
+ ${UMF_CMAKE_SOURCE_DIR} /include
59
+ ./common
60
+ ./critnib
61
+ ./provider
62
+ ./utils )
58
63
59
64
# libumf_pool_jemalloc
60
65
if (UMF_BUILD_LIBUMF_POOL_JEMALLOC )
Original file line number Diff line number Diff line change 57
57
#include <stdbool.h>
58
58
#include <stddef.h>
59
59
60
- #include "../utils/utils_concurrency.h"
61
60
#include "critnib.h"
61
+ #include "utils_concurrency.h"
62
62
63
63
/*
64
64
* A node that has been deleted is left untouched for this many delete
Original file line number Diff line number Diff line change 22
22
// TODO: replace with logger?
23
23
#include < iostream>
24
24
25
- #include " ../utils/utils_math.h"
26
25
#include " umf.h"
27
26
#include " umf/pools/pool_disjoint.h"
28
27
#include " umf_helpers.hpp"
28
+ #include " utils_math.h"
29
29
30
30
typedef struct umf_disjoint_pool_shared_limits_t {
31
31
size_t MaxSize;
Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ function(add_umf_test)
39
39
40
40
target_include_directories (${TEST_TARGET_NAME} PRIVATE
41
41
${UMF_TEST_DIR} /common
42
- ${CMAKE_SOURCE_DIR} /src/pool/disjoint )
42
+ ${UMF_CMAKE_SOURCE_DIR} /src
43
+ ${UMF_CMAKE_SOURCE_DIR} /src/pool/disjoint )
43
44
44
45
add_test (NAME ${TEST_NAME}
45
46
COMMAND ${TEST_TARGET_NAME}
Original file line number Diff line number Diff line change @@ -12,4 +12,4 @@ set(COMMON_SOURCES
12
12
13
13
add_umf_library (test_common STATIC ${COMMON_SOURCES} )
14
14
15
- target_include_directories (test_common PRIVATE ../.. /include )
15
+ target_include_directories (test_common PRIVATE ${UMF_CMAKE_SOURCE_DIR} /include )
Original file line number Diff line number Diff line change 2
2
// Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
3
3
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
4
5
- #include " ../src/ memory_pool_internal.h"
5
+ #include " memory_pool_internal.h"
6
6
#include " base.hpp"
7
7
#include " common/provider_null.h"
8
8
#include " pool.hpp"
You can’t perform that action at this time.
0 commit comments