Skip to content

Commit e82c13a

Browse files
committed
update
1 parent 605b541 commit e82c13a

File tree

4 files changed

+12
-75
lines changed

4 files changed

+12
-75
lines changed

src/iceberg/test/CMakeLists.txt

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ set(ICEBERG_TEST_RESOURCES "${CMAKE_SOURCE_DIR}/src/iceberg/test/resources")
2828

2929
configure_file("test_config.h.in" "test_config.h")
3030

31-
add_subdirectory(util)
32-
3331
function(add_iceberg_test test_name)
3432
set(options USE_BUNDLE)
3533
set(oneValueArgs)
@@ -41,16 +39,15 @@ function(add_iceberg_test test_name)
4139
${ARGN})
4240

4341
add_executable(${test_name})
44-
target_include_directories(${test_name} PRIVATE "${CMAKE_BINARY_DIR}/iceberg/test/")
42+
target_include_directories(${test_name} PRIVATE "${CMAKE_BINARY_DIR}/iceberg/test/"
43+
"${CMAKE_SOURCE_DIR}/src")
4544

46-
target_sources(${test_name} PRIVATE ${ARG_SOURCES})
45+
target_sources(${test_name} PRIVATE ${ARG_SOURCES} util/common_util.cc)
4746

4847
if(ARG_USE_BUNDLE)
49-
target_link_libraries(${test_name} PRIVATE iceberg_bundle_static GTest::gmock_main
50-
iceberg_test_util)
48+
target_link_libraries(${test_name} PRIVATE iceberg_bundle_static GTest::gmock_main)
5149
else()
52-
target_link_libraries(${test_name} PRIVATE iceberg_static GTest::gmock_main
53-
iceberg_test_util)
50+
target_link_libraries(${test_name} PRIVATE iceberg_static GTest::gmock_main)
5451
endif()
5552

5653
add_test(NAME ${test_name} COMMAND ${test_name})
@@ -161,10 +158,10 @@ if(ICEBERG_BUILD_REST)
161158
${ARGN})
162159

163160
add_executable(${test_name})
164-
target_include_directories(${test_name} PRIVATE "${CMAKE_BINARY_DIR}/iceberg/test/")
165-
target_sources(${test_name} PRIVATE ${ARG_SOURCES})
166-
target_link_libraries(${test_name} PRIVATE GTest::gmock_main iceberg_rest_static
167-
iceberg_test_util)
161+
target_include_directories(${test_name} PRIVATE "${CMAKE_BINARY_DIR}/iceberg/test/"
162+
"${CMAKE_SOURCE_DIR}/src")
163+
target_sources(${test_name} PRIVATE ${ARG_SOURCES} util/common_util.cc)
164+
target_link_libraries(${test_name} PRIVATE GTest::gmock_main iceberg_rest_static)
168165
add_test(NAME ${test_name} COMMAND ${test_name})
169166
endfunction()
170167

src/iceberg/test/meson.build

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ configure_file(
2727
install_dir: get_option('includedir') / 'iceberg/test',
2828
)
2929

30-
subdir('util')
31-
3230
iceberg_tests = {
3331
'schema_test': {
3432
'sources': files(
@@ -115,11 +113,12 @@ endif
115113
foreach test_name, values : iceberg_tests
116114
exc = executable(
117115
test_name,
118-
sources: values['sources'],
119-
dependencies: [iceberg_dep, gmock_main_dep, iceberg_test_util_dep] + values.get(
116+
sources: values['sources'] + files('util/common_util.cc'),
117+
dependencies: [iceberg_dep, gmock_main_dep] + values.get(
120118
'dependencies',
121119
[],
122120
),
121+
include_directories: include_directories('.'),
123122
)
124123
test(test_name, exc)
125124
endforeach

src/iceberg/test/util/CMakeLists.txt

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/iceberg/test/util/meson.build

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)