File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 4949 with :
5050 runner : windows-2025
5151 build_type : ${{ matrix.build_type }}
52- cmake_args : ' -DADA_DEVELOPMENT_CHECKS=ON -DCMAKE_CXX_COMPILER=clang-cl'
52+ cmake_args : ' -DADA_DEVELOPMENT_CHECKS=ON -DCMAKE_C_COMPILER=clang-cl - DCMAKE_CXX_COMPILER=clang-cl'
Original file line number Diff line number Diff line change @@ -52,7 +52,18 @@ endif()
5252macro (add_gtest_test exe cpp)
5353 add_executable (${exe} ${cpp} )
5454 target_link_libraries (${exe} PRIVATE simdjson GTest::gtest_main)
55- gtest_discover_tests(${exe} PROPERTIES TEST_DISCOVERY_TIMEOUT 600)
55+ # Use PRE_TEST discovery mode for cross-compilation where the test binary
56+ # cannot be executed at build time (e.g., LoongArch via QEMU).
57+ # Use POST_BUILD (default) for native builds to avoid DLL/PATH issues on Windows.
58+ if (CMAKE_CROSSCOMPILING )
59+ set (GTEST_DISCOVERY_MODE PRE_TEST)
60+ else ()
61+ set (GTEST_DISCOVERY_MODE POST_BUILD)
62+ endif ()
63+ gtest_discover_tests(${exe}
64+ DISCOVERY_MODE ${GTEST_DISCOVERY_MODE}
65+ PROPERTIES TEST_DISCOVERY_TIMEOUT 600
66+ )
5667 set_source_files_properties (${cpp} PROPERTIES SKIP_LINTING ON )
5768endmacro ()
5869
You can’t perform that action at this time.
0 commit comments