-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add RapidCheck library to CMake dependencies
We agreed to use RapidCheck for testing as it is improvement with no cost, it also integrates well with current GoogleTest/GTest stack. Signed-off-by: Leonard Ossa <[email protected]>
- Loading branch information
Showing
2 changed files
with
27 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,29 @@ | ||
if (MSVC) | ||
find_package(GTest CONFIG REQUIRED) | ||
set(GTEST_LIB GTest::gtest_main) | ||
else() | ||
set(GTEST_LIB gtest_main) | ||
if(NOT OVPN_GTEST_VERSION) | ||
# renovate: datasource=github-releases depName=google/googletest | ||
set(OVPN_GTEST_VERSION v1.15.0) | ||
endif() | ||
include(FetchContent) | ||
|
||
set(RC_ENABLE_GTEST | ||
ON | ||
CACHE BOOL "Rapidcheck GTest Support" FORCE) | ||
FetchContent_Declare( | ||
rapidcheck | ||
GIT_REPOSITORY https://github.com/emil-e/rapidcheck.git | ||
GIT_TAG ff6af6fc683159deb51c543b065eba14dfcf329b # master Dec 14, 2023 | ||
) | ||
|
||
include(FetchContent) | ||
if(MSVC) | ||
find_package(GTest CONFIG REQUIRED) | ||
set(GTEST_LIB GTest::gtest_main) | ||
else() | ||
set(GTEST_LIB gtest_main) | ||
if(NOT OVPN_GTEST_VERSION) | ||
# renovate: datasource=github-releases depName=google/googletest | ||
set(OVPN_GTEST_VERSION v1.15.0) | ||
endif() | ||
|
||
FetchContent_Declare( | ||
googletest | ||
GIT_REPOSITORY https://github.com/google/googletest.git | ||
GIT_TAG ${OVPN_GTEST_VERSION} | ||
) | ||
FetchContent_MakeAvailable(googletest) | ||
FetchContent_Declare( | ||
googletest | ||
GIT_REPOSITORY https://github.com/google/googletest.git | ||
GIT_TAG ${OVPN_GTEST_VERSION}) | ||
FetchContent_MakeAvailable(googletest) | ||
endif() | ||
|
||
endif () | ||
FetchContent_MakeAvailable(rapidcheck) |
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