Skip to content

Commit 9a2360d

Browse files
jan-wassenbergcopybara-github
authored andcommitted
Move batch_bench into test section, add GTest dep. Fixes #501
PiperOrigin-RevId: 729494223
1 parent f9d93e4 commit 9a2360d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,6 @@ install(TARGETS gemma DESTINATION bin)
138138
add_executable(single_benchmark evals/benchmark.cc)
139139
target_link_libraries(single_benchmark libgemma hwy hwy_contrib nlohmann_json::nlohmann_json)
140140

141-
add_executable(gemma_batch_bench evals/gemma_batch_bench.cc)
142-
target_link_libraries(gemma_batch_bench libgemma hwy hwy_contrib nlohmann_json::nlohmann_json)
143-
144141
add_executable(benchmarks evals/benchmarks.cc)
145142
target_link_libraries(benchmarks libgemma hwy hwy_contrib nlohmann_json::nlohmann_json benchmark)
146143

@@ -186,10 +183,14 @@ foreach (TESTFILE IN LISTS GEMMA_TEST_FILES)
186183
# that include us may set them.
187184
target_compile_options(${TESTNAME} PRIVATE -DHWY_IS_TEST=1)
188185

189-
target_link_libraries(${TESTNAME} PRIVATE libgemma GTest::gtest_main hwy hwy_contrib hwy_test)
186+
target_link_libraries(${TESTNAME} PRIVATE libgemma GTest::Main hwy hwy_contrib hwy_test)
190187

191188
gtest_discover_tests(${TESTNAME})
192189
endforeach ()
190+
191+
add_executable(gemma_batch_bench evals/gemma_batch_bench.cc)
192+
target_link_libraries(gemma_batch_bench libgemma GTest::Main hwy hwy_contrib nlohmann_json::nlohmann_json)
193+
193194
endif() # GEMMA_ENABLE_TESTS
194195

195196
## Tools

0 commit comments

Comments
 (0)