@@ -34,23 +34,42 @@ if(PAIMON_ENABLE_LANCE)
3434 ${PAIMON_VERSION_SCRIPT_FLAGS} )
3535
3636 if (PAIMON_BUILD_TESTS)
37- add_paimon_test (lance_format_test
38- SOURCES
39- lance_file_format_test.cpp
40- lance_api_test.cpp
41- lance_format_reader_writer_test.cpp
42- lance_stats_extractor_test.cpp
43- EXTRA_INCLUDES
44- ${LANCE_INCLUDE_DIR}
45- STATIC_LINK_LIBS
46- paimon_shared
47- test_utils_static
48- "-Wl,--whole-archive"
49- paimon_local_file_system_static
50- paimon_lance_file_format_static
51- "-Wl,--no-whole-archive"
52- lance_lib_rc
53- ${GTEST_LINK_TOOLCHAIN} )
37+ if (APPLE )
38+ add_paimon_test (lance_format_test
39+ SOURCES
40+ lance_file_format_test.cpp
41+ lance_api_test.cpp
42+ lance_format_reader_writer_test.cpp
43+ lance_stats_extractor_test.cpp
44+ EXTRA_INCLUDES
45+ ${LANCE_INCLUDE_DIR}
46+ STATIC_LINK_LIBS
47+ paimon_shared
48+ test_utils_static
49+ "-Wl,-force_load"
50+ paimon_local_file_system_static
51+ paimon_lance_file_format_static
52+ lance_lib_rc
53+ ${GTEST_LINK_TOOLCHAIN} )
54+ else ()
55+ add_paimon_test (lance_format_test
56+ SOURCES
57+ lance_file_format_test.cpp
58+ lance_api_test.cpp
59+ lance_format_reader_writer_test.cpp
60+ lance_stats_extractor_test.cpp
61+ EXTRA_INCLUDES
62+ ${LANCE_INCLUDE_DIR}
63+ STATIC_LINK_LIBS
64+ paimon_shared
65+ test_utils_static
66+ "-Wl,--whole-archive"
67+ paimon_local_file_system_static
68+ paimon_lance_file_format_static
69+ "-Wl,--no-whole-archive"
70+ lance_lib_rc
71+ ${GTEST_LINK_TOOLCHAIN} )
72+ endif ()
5473 endif ()
5574
5675endif ()
0 commit comments