Skip to content

Commit 7442cee

Browse files
committed
web: fix CMake test build and register missing tests
Add gui_descriptors to TEST_LIBS so every test in src/web/test/cpp picks up the gui/include directory (web links gui_descriptors PRIVATE, so the include path didn't propagate to consumers). Also register the three tests that existed in Bazel but not in CMake: TestClockTreeReport, TestSaveImage, TestSnap. Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
1 parent 0e09006 commit 7442cee

1 file changed

Lines changed: 44 additions & 1 deletion

File tree

src/web/test/cpp/CMakeLists.txt

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set(TEST_LIBS
66
utl_lib
77
lodepng
88
tst
9+
gui_descriptors
910
GTest::gtest
1011
GTest::gtest_main
1112
)
@@ -25,7 +26,7 @@ gtest_discover_tests(TestTileGenerator
2526

2627
add_executable(TestRequestHandler TestRequestHandler.cpp)
2728

28-
target_link_libraries(TestRequestHandler ${TEST_LIBS} gui_descriptors)
29+
target_link_libraries(TestRequestHandler ${TEST_LIBS})
2930

3031
target_include_directories(TestRequestHandler
3132
PRIVATE
@@ -75,10 +76,52 @@ gtest_discover_tests(TestGlyphCache
7576
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..
7677
)
7778

79+
add_executable(TestClockTreeReport TestClockTreeReport.cpp)
80+
81+
target_link_libraries(TestClockTreeReport ${TEST_LIBS})
82+
83+
target_include_directories(TestClockTreeReport
84+
PRIVATE
85+
${CMAKE_CURRENT_SOURCE_DIR}/../../src
86+
)
87+
88+
gtest_discover_tests(TestClockTreeReport
89+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..
90+
)
91+
92+
add_executable(TestSaveImage TestSaveImage.cpp)
93+
94+
target_link_libraries(TestSaveImage ${TEST_LIBS})
95+
96+
target_include_directories(TestSaveImage
97+
PRIVATE
98+
${CMAKE_CURRENT_SOURCE_DIR}/../../src
99+
)
100+
101+
gtest_discover_tests(TestSaveImage
102+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..
103+
)
104+
105+
add_executable(TestSnap TestSnap.cpp)
106+
107+
target_link_libraries(TestSnap ${TEST_LIBS})
108+
109+
target_include_directories(TestSnap
110+
PRIVATE
111+
${CMAKE_CURRENT_SOURCE_DIR}/../../src
112+
)
113+
114+
gtest_discover_tests(TestSnap
115+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..
116+
)
117+
78118
add_dependencies(build_and_test
79119
TestTileGenerator
80120
TestRequestHandler
81121
TestSaveReport
82122
TestDebugGraphics
83123
TestGlyphCache
124+
TestClockTreeReport
125+
TestSaveImage
126+
TestSnap
84127
)

0 commit comments

Comments
 (0)