[rapidcheck] Add initial support for RapidCheck (#4605)

* Add initial support for RapidCheck

Create a portfile for the C++ property-based testing library RapidCheck.
This port is relatively straight forward but there are a couple of caveats:
 * The current port uses a branch from a fork that I modified as the CMake installation logic had some problems.
   The library was almost exclusively used by being added as a subfolder so the CMake export machinery was probably not well tested.
 * The changes are going to get merged into the main repository eventually and then it would be possible to change where the source
   code is downloaded.

I am unaware when the main RapidCheck library maintainer will accept my pull request, so it is better to have this library in VCPKG
sooner, rather than later.

* Update the RapidCheck portfile to download the library sources for the main repository

 * Since the maintainer of RapidCheck very quickly merged the required CMake modifications
   to enable the proper installation of the library, it is better to now use the official
   repository's master branch.
 * Change the versioning of the library to be based on the date of the git reference chosen
   since rapid check does not have an explicit versioning scheme.

* Update rapidcheck and modify configuration step

* [rapidcheck] Tidy
This commit is contained in:
Stefan Ivanov 2018-11-08 09:44:36 +02:00 committed by Robert Schumacher
parent 17870d0fdd
commit 40af541c50
2 changed files with 33 additions and 0 deletions

3
ports/rapidcheck/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: rapidcheck
Version: 2018-11-05-1
Description: A property-based testing library for C++ (a la QuickCheck) with the goal of being simple to use with as little boilerplate as possible.

View File

@ -0,0 +1,30 @@
include(vcpkg_common_functions)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO emil-e/rapidcheck
REF cf9e0d8bd8c94e9dc00dc0ab302352bfaf1a3ac5
SHA512 6cef62edbda391c3527d63db350842f669841ad2c751a64773250cd40bb65f26c2c394b107ef5530c2d3bd15b7079148fa9778d68a7346225bbb15227b1553c5
HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DRC_INSTALL_ALL_EXTRAS=ON
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/rapidcheck/cmake)
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
# Handle copyright
configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/rapidcheck/copyright COPYONLY)
# Post-build test for cmake libraries
vcpkg_test_cmake(PACKAGE_NAME rapidcheck)