Skip to content

Commit 2fa3604

Browse files
update cmake
Signed-off-by: AdityaPandeyCN <[email protected]>
1 parent c5bd11f commit 2fa3604

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.codecov.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ ignore:
4242

4343
- "Doxyfile"
4444

45-
# Define coverage flags for different components
4645
flags:
4746
ramcore:
4847
paths:

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ if(RAMTOOLS_BUILD_TESTS)
8686
add_custom_target(coverage
8787
COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure
8888
COMMAND gcovr -r ${CMAKE_SOURCE_DIR} --html --html-details -o ${CMAKE_BINARY_DIR}/coverage.html
89-
COMMAND gcovr -r ${CMAKE_SOURCE_DIR} --xml -o ${CMAKE_BINARY_DIR}/coverage.xml
89+
COMMAND gcovr -r ${CMAKE_SOURCE_DIR} --xml-pretty --xml coverage.xml
9090
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
9191
COMMENT "Running tests and generating code coverage report..."
9292
)

test/CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,21 @@ function(add_ramcore_test test_name)
66
${ARGN}
77
LIBRARIES
88
ramcore
9-
sam_generator
10-
benchmark::benchmark
119
ROOT::Core
1210
ROOT::Tree
1311
ROOT::ROOTNTuple
1412
ROOT::RIO
1513
gtest
1614
gtest_main
1715
)
16+
17+
if(RAMTOOLS_BUILD_BENCHMARKS)
18+
target_link_libraries(${test_name}
19+
sam_generator
20+
benchmark::benchmark
21+
)
22+
endif()
23+
1824
target_include_directories(${test_name}
1925
PRIVATE
2026
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/inc>

0 commit comments

Comments
 (0)