-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #767 from jdemel/newtest
Add googletest based tests
- Loading branch information
Showing
9 changed files
with
609 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# | ||
# Copyright 2022, 2024 Johannes Demel | ||
# | ||
# This file is part of VOLK. | ||
# | ||
# SPDX-License-Identifier: LGPL-3.0-or-later | ||
# | ||
|
||
if(NOT ENABLE_TESTING) | ||
return() | ||
endif(NOT ENABLE_TESTING) | ||
|
||
find_package(fmt) | ||
find_package(GTest) | ||
|
||
if(NOT fmt_FOUND OR NOT GTest_FOUND) | ||
message(warning "Missing fmtlib and/or googletest for this test suite") | ||
return() | ||
endif(NOT fmt_FOUND OR NOT GTest_FOUND) | ||
|
||
file(GLOB volk_test_files "test_*.cc") | ||
|
||
add_executable( | ||
volk_tests | ||
volk_test.cc | ||
${volk_test_files} | ||
) | ||
|
||
target_compile_features(volk_tests PUBLIC cxx_std_20) | ||
|
||
target_link_libraries(volk_tests | ||
PRIVATE | ||
GTest::gtest_main | ||
volk | ||
fmt::fmt | ||
) | ||
|
||
include(GoogleTest) | ||
gtest_discover_tests(volk_tests) | ||
|
||
|
||
target_include_directories(volk_tests | ||
PRIVATE $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include> | ||
PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> | ||
PRIVATE $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/lib> | ||
PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/lib> | ||
PRIVATE ${CMAKE_CURRENT_BINARY_DIR} | ||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} | ||
) |
Oops, something went wrong.