File tree Expand file tree Collapse file tree 4 files changed +16
-10
lines changed Expand file tree Collapse file tree 4 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,6 @@ if (BUILD_TESTS)
81
81
${DATASTRUCT_TESTS_THRIFT_FILES}
82
82
./nvmcache/tests/NvmTestBase.cpp
83
83
./memory/tests/TestBase.cpp
84
- ../common/TestUtils.cpp
85
84
)
86
85
add_dependencies (allocator_test_support thrift_generated_files )
87
86
target_link_libraries (allocator_test_support PUBLIC
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ add_thrift_file(DATATYPEBENCH DataTypeBench.thrift frozen2)
17
17
if (BUILD_TESTS )
18
18
add_library (benchmark_test_support
19
19
${DATATYPEBENCH_THRIFT_FILES}
20
- ../common/TestUtils.cpp
21
20
)
22
21
23
22
add_dependencies (benchmark_test_support thrift_generated_files )
Original file line number Diff line number Diff line change @@ -47,19 +47,28 @@ install(TARGETS cachelib_common
47
47
48
48
49
49
if (BUILD_TESTS )
50
- add_library (common_test_support INTERFACE )
51
- target_link_libraries (common_test_support INTERFACE
50
+ add_library (common_test_utils STATIC
51
+ TestUtils.cpp
52
+ )
53
+ target_link_libraries (common_test_utils PUBLIC
52
54
cachelib_common
53
- common_test_utils
54
55
gflags
55
56
GTest::gtest
56
57
GTest::gtest_main
57
58
)
58
- target_sources ( common_test_support INTERFACE
59
- TestUtils.cpp
59
+
60
+ add_library ( common_test_support OBJECT
60
61
hothash/HotHashDetectorTest.cpp
61
62
piecewise/GenericPiecesTest.cpp
62
- piecewise/RequestRangeTest.cpp )
63
+ piecewise/RequestRangeTest.cpp
64
+ )
65
+ target_link_libraries (common_test_support PUBLIC
66
+ cachelib_common
67
+ common_test_utils
68
+ gflags
69
+ GTest::gtest
70
+ GTest::gtest_main
71
+ )
63
72
64
73
function (ADD_TEST SOURCE_FILE )
65
74
# Add any additional libraries BEFORE the "common_test_support" to ensure
Original file line number Diff line number Diff line change @@ -23,10 +23,9 @@ if (BUILD_TESTS)
23
23
GTest::gtest
24
24
GTest::gmock
25
25
)
26
- target_sources (compact_cache_test_support INTERFACE ../common/TestUtils.cpp )
27
26
28
27
function (ADD_TEST SOURCE_FILE )
29
- generic_add_test ("compact-cache-test" "${SOURCE_FILE} "
28
+ generic_add_test ("compact-cache-test" "${SOURCE_FILE} "
30
29
compact_cache_test_support "${ARGN} " )
31
30
endfunction ()
32
31
You can’t perform that action at this time.
0 commit comments