frugally-deep: Building the unit tests(doctest.h) error
I’ve done the following commands as described in README.
# install doctest
wget https://raw.githubusercontent.com/onqtam/doctest/master/doctest/doctest.h
sudo mv ./doctest.h /usr/local/include/doctest.h
# build unit tests
cmake -DFDEEP_BUILD_UNITTEST=ON ..
But an error occurred that did not find hunter_add_package(doctest).
$ cmake -DFDEEP_BUILD_UNITTEST=ON ..
-- ===( frugally-deep 0.2.3 )===
-- Building Unit Tests
CMake Error at test/CMakeLists.txt:52 (find_package):
Could not find a package configuration file provided by "doctest" with any
of the following names:
doctestConfig.cmake
doctest-config.cmake
Add the installation prefix of "doctest" to CMAKE_PREFIX_PATH or set
"doctest_DIR" to a directory containing one of the above files. If
"doctest" provides a separate development package or SDK, be sure it has
been installed.
-- Configuring incomplete, errors occurred!
See also "/Users/kaonpark/workspace/github.com/Dobiasd/frugally-deep/build/CMakeFiles/CMakeOutput.log".
I’d like to perform unit tests. can I get help?
Thanks.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (17 by maintainers)
Sure. I’ll update
fplusto use the installeddoctest.Hunter is disabled by default, so the
hunter_add_package(doctest)call is a noop.See:
https://github.com/Dobiasd/frugally-deep/blob/562349afe9c98cc6336120873738764d2bfa0c12/cmake/hunter.cmake#L1
You can enable hunter by defining
HUNTER_ENABLED=ONin your CMake options, and it will be managed for you.