-
Notifications
You must be signed in to change notification settings - Fork 853
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
47 lines (43 loc) · 1.19 KB
/
CMakeLists.txt
File metadata and controls
47 lines (43 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
if(BUILD_FUZZTEST)
include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third_party/fuzztest)
else()
include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third_party/googletest/googletest/include)
include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third_party/googletest/googlemock/include)
endif()
set(unittest_SOURCES
arena.cpp
source-map.cpp
cfg.cpp
dfa_minimization.cpp
disjoint_sets.cpp
interpreter.cpp
intervals.cpp
json.cpp
lattices.cpp
local-graph.cpp
possible-contents.cpp
printing.cpp
scc.cpp
stringify.cpp
suffix_tree.cpp
topological-sort.cpp
type-builder.cpp
wat-lexer.cpp
validator.cpp
)
if(BUILD_FUZZTEST)
set(unittest_SOURCES ${unittest_SOURCES} type-domains.cpp)
endif()
# suffix_tree.cpp includes LLVM header using std::iterator (deprecated in C++17)
if (NOT MSVC)
set_source_files_properties(suffix_tree.cpp PROPERTIES COMPILE_FLAGS -Wno-deprecated-declarations)
endif()
enable_testing()
include(GoogleTest)
binaryen_add_executable(binaryen-unittests "${unittest_SOURCES}")
if(BUILD_FUZZTEST)
link_fuzztest(binaryen-unittests)
gtest_discover_tests(binaryen-unittests)
else()
target_link_libraries(binaryen-unittests PRIVATE gtest gtest_main)
endif()