Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions test/gtest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,11 @@ set(unittest_SOURCES
type-builder.cpp
wat-lexer.cpp
validator.cpp
source-map.cpp
)

if(BUILD_FUZZTEST)
set(unittest_SOURCES ${unittest_SOURCES} type-domains.cpp)
else()
# source-map.cpp uses the gmock-matchers.h header, which is included with the
# "standard" upstream gtest library, but not with the one bundled into the
# fuzztest library (and the gmock included with upstream gtest seems
# incompatible with the one in fuzztest). For now we work around this by just
# excluding source-map.cpp from the fuzztest build, but if we start using
# gmock more we should figure out what the right way to hande this is.
set(unittest_SOURCES ${unittest_SOURCES} source-map.cpp)
endif()

# suffix_tree.cpp includes LLVM header using std::iterator (deprecated in C++17)
Expand All @@ -61,6 +54,7 @@ include(GoogleTest)
binaryen_add_executable(binaryen-unittests "${unittest_SOURCES}")
if(BUILD_FUZZTEST)
link_fuzztest(binaryen-unittests)
target_link_libraries(binaryen-unittests PRIVATE gmock)
gtest_discover_tests(binaryen-unittests)
else()
target_link_libraries(binaryen-unittests PRIVATE gtest gtest_main)
Expand Down
Loading