cpp-pm / hunter Goto Github PK
View Code? Open in Web Editor NEWThis project forked from ruslo/hunter
CMake driven cross-platform package manager for C/C++.
License: BSD 2-Clause "Simplified" License
This project forked from ruslo/hunter
CMake driven cross-platform package manager for C/C++.
License: BSD 2-Clause "Simplified" License
We currently use appveyor for CI on Windows, and Travis for CI on Mac/iOS/Linux. This means that you need to enable both on any fork you create, to run CI on a package.
Travis has released Windows support, a la https://blog.travis-ci.com/2018-10-11-windows-early-release, so we could experiment with running the windows builds on Travis as well, and not need to support appveyor.
optick
Hi,
I'd like to update boost to the latest version, also containing the new lib variant2.
Previous versions have been stored here:
https://github.com/hunter-packages/boost
with a branch for each release removing docs, examples, and tests.
And if needed patches are applied.
If we keep this, could you (@bkotzz @rbsheth ) give me access to it?
So I could also take care of future version.
Or what would your preferred way to update boost?
I've published at https://github.com/cristianadam/SetupHunter an easy way to download / keep up to date Hunter packages.
At https://www.qt.io/blog/qt-5.14-android-multi-abi-and-cmake you can see how Hunter can be used in building multi ABI Qt Android applications.
I would like to contribute this project to Hunter, what do you think?
hunter_add_package
/find_package
API used by me in the example is the same as in documentation. [Yes]URL
/SHA1
. [No - from master branch]UPDATED A LOT:
I tests pip_numpy
by pushing the pkg.pip_numpy
branch up to Appveyor and Travis. I got the following results:
MSYS and macOS builds are not working. The macOS ones are because Travis do not guarantee a Python version and have updated the old images with a new Python, PR here #117 . I am not sure why the MSYS ones say /usr/bin/python3.7.exe: No module named pip
yet.
I have set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set in my toolchain. The cmake policy CMP0063 governs a change around this property:
CMake Warning (dev) at src/CMakeLists.txt:15 (add_library):
Policy CMP0063 is not set: Honor visibility properties for all target
types. Run "cmake --help-policy CMP0063" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Target "benchmark" of type "STATIC_LIBRARY" has the following visibility
properties set for CXX:
CXX_VISIBILITY_PRESET
VISIBILITY_INLINES_HIDDEN
For compatibility CMake is not honoring them for this target.
This warning is for project developers. Use -Wno-dev to suppress it.
This can be seen when compiling some of my dependencies during the configuration phase. I have set the corresponding cmake policy in the toolchain now. Alas, whenever the main CMakeLists.txt of the dependency has cmake_minimum_required
with version < 3.3, the change is not propagated out of the toolchain to the project.
Instead of just continuing the configuration, I would like to enable -Werror=dev
to detect this early on. This works when the policy is warned for in the actual project. It does not propagate to the compiled dependencies in hunter, though.
Is there such an option available or would there by interest in having this available?
Do variables __HUNTER_LAST_DEFAULT_VERSION_NAME
, __HUNTER_ALLOW_DEFAULT_VERSION_LOADING
and checks related to them protect hunter users against doing anything wrong?
The only effect to these checks I've found is disabling hunter_default_version
in user config, which allows you to add a new package without forking whole hunter. You can also change a version of an existing package, but you can do the same with hunter_config
.
You can test it by setting this in local config
set(__HUNTER_LAST_DEFAULT_VERSION_NAME ""
"Disable alphabetic verification of hunter_default_version calls")
set(__HUNTER_ALLOW_DEFAULT_VERSION_LOADING YES
"Allow hunter_default_version calls outside Hunter")
hunter_default_version(some_package_added_to_HUNTER_SELF/cmake/projects VERSION ...)
I've used this for a while and didn't find any problem with it, so maybe those checks should be removed.
hunter_add_package
/find_package
API used by me in the example is the same as in documentation. [Yes]URL
/SHA1
. [Yes]# CMakeLists.txt
cmake_minimum_required(VERSION 3.15)
include("cmake/HunterGate.cmake")
HunterGate(
URL "..."
SHA1 "..."
)
project(foo)
hunter_add_package(hunter_venv)
find_package(hunter_venv CONFIG REQUIRED)
# Fails as CMAKE_FIND_FRAMEWORK set to NEVER
find_library(ACCEL Accelerate)
Since cmake 3.15 a new option has been available Python_FIND_VIRTUALENV
, which avoids the need to change the macOS global CMake setting CMAKE_FIND_FRAMEWORK
and the Windows Python_FIND_REGISTRY
(which is at least Python specific so probably OK).
I will need a hunter-packages for hunter_venv
to make an update to it something like the following:
if (version is >= 3.15)
set(Python_FIND_VIRTUALENV ONLY)
else()
set(CMAKE_FIND_FRAMEWORK NEVER)
set(Python_FIND_REGISTRY NEVER)
endif()
Qt is currently at 5.11, which is no longer supported (and thus the download link hunter tries returns a 404). This needs to be fixed by pointing at the "archival" download location or updating Qt to a supported version.
Current state:
When adding a new package to hunter, many times we need to fork that package to make modifications to it. These commonly are:
hunter_add_package
in addition to the usual find_package
)Needing to make forks to add a package creates an extra overhead that would be nice to avoid. However, we probably can't get away with needing to make changes to packages to use them, because we rely on "CMake best practices" that upstream maintainers either haven't added or aren't interested in adding.
A more lightweight version:
Here is an example of a PR to a fork, to hunterize a package hunter-packages/Bento4#1, at version 1.5.1-628-e6ee435-p0
. Instead of making a fork, and pushing a commit to it, we could generate a patch, with git diff HEAD~1 HEAD > 1.5.1-628-e6ee435-p0.patch
. We could then take that patch, and when making the PR against hunter too add the package, like ruslo#1797, we would include the patch file. So we would have cmake/projects/bento4/1.5.1-628-e6ee435-p0.patch
. Then, our hunter config would look like this, using the upstream release tar:
hunter_add_version(
PACKAGE_NAME
bento4
VERSION
"1.5.1-628-e6ee435-p0"
URL
"https://github.com/hunter-packages/Bento4/archive/v1.5.1-628-e6ee435-p0.tar.gz"
SHA1
f296f38004cd6523eed12ce15cbbfaa8ce6fa050
LOCAL_PATCH
ON
)
After downloading the source, and before building it, we would have an extra step:
> download https://github.com/hunter-packages/Bento4/archive/v1.5.1-628-e6ee435-p0.tar.gz
> extract v1.5.1-628-e6ee435-p0.tar.gz
> cd v1.5.1-628-e6ee435-p0
> git apply ${HUNTER_ROOT}/cmake/projects/bento4/1.5.1-628-e6ee435-p0.patch, if it exists
To support packages with multiple versions in hunter, we could keep multiple patch files in the project folder in hunter.
Benefits:
Disadvantages:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2f08b2f..c7170c3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,7 @@
# cmake -DCMAKE_BUILD_TYPE=Debug ..
# cmake -DCMAKE_BUILD_TYPE=Release ..
-cmake_minimum_required(VERSION 2.8)
-project(bento4)
+cmake_minimum_required(VERSION 3.0.2)
+project(bento4 LANGUAGES CXX VERSION "0.0.0")
Instead of
Likely we can support both the fork and patch models, and only use the patch models on small changes. However, small patches cover the overwhelming majority of package forks in hunter.
Summary:
I'd like to promote the original issue/feature request https://github.com/ruslo/hunter/issues/1807
from the original issue:
https://github.com/ruslo/hunter/blob/v0.23.151/cmake/schemes/url_sha1_cmake.cmake.in#L142-L163
Lock Download and /.../Install directories separately.
If this feature is implemented, it will be possible if you have multiple different local CMake projects:
# CMakeLists.txt
cmake_minimum_required(VERSION 3.2)
include(cmake/HunterGate.cmake)
HunterGate(URL ... SHA1 ...)
project(downloader)
hunter_add_package(${REQUESTED_PACKAGE})
In different terminals:
> cmake -H. -B_builds/package-1 -DREQUESTED_PACKAGE=package-1
> cmake -H. -B_builds/package-2 -DREQUESTED_PACKAGE=package-2
> cmake -H. -B_builds/package-3 -DREQUESTED_PACKAGE=package-3
> cmake -H. -B_builds/package-4 -DREQUESTED_PACKAGE=package-4
> ...
yaml-cpp
package has in hunter-v0.23.229.tar\hunter-0.23.229\cmake\projects\yaml-cpp\hunter.cmake
the following code:
hunter_add_version(
PACKAGE_NAME
yaml-cpp
VERSION
"0.6.2-0f9a586-p1"
URL
"https://github.com/hunter-packages/yaml-cpp/archive/v0.6.2-0f9a586-p1.zip"
SHA1
956C2B5FBF5AA0EB8EF5EF890C0328B3AA357A13
)
which works on Windows, but not that much on Linux.
The previous versions have lowercase SHA1s.
hunter_add_package
/find_package
API used by me in the example is the same as in documentation. [Yes]URL
/SHA1
. [Yes]the functionality of HUNTER_DOWNLOAD_SERVER
(Documentation) does not work with the scheme url_sha1_download
url_sha1_download
uses file(DOWNLOAD ) command, which doesn't support multiple URLs to download.
https://github.com/cpp-pm/hunter/blob/master/cmake/schemes/url_sha1_download.cmake.in#L52-L58
url_sha1_cmake
on the other hand uses ExternalProject_Add which supports multiple URLs since cmake v3.7
https://github.com/cpp-pm/hunter/blob/master/cmake/schemes/url_sha1_cmake.cmake.in#L152
We could use ExternalProject_Add
instead of file(DOWNLOAD)
in url_sha1_download
# CMakeLists.txt
set(HUNTER_DOWNLOAD_SERVER "http://internal-download-server.domain/hunter/projects;http://allowed-source1.domain;http://allowed-source2.domain;http://allowed-source3.domain")
cmake_minimum_required(VERSION 3.2)
include("cmake/HunterGate.cmake")
HunterGate(
URL "..."
SHA1 "..."
)
project(download-ippicv)
hunter_add_package(ippicv)
file(GLOB ippicv_archive "${IPPICV_ROOT}/ippicv_*")
if(EXISTS "${ippicv_archive}")
message("ippicv archive: ${ippicv_archive}")
else()
message(FATAL_ERROR "Nothing found in `${IPPICV_ROOT}`")
endif()
Here is the log until first error reported by Hunter, option HUNTER_STATUS_DEBUG
is ON
:
-- [hunter] Error: downloading 'http://internal-download-server.domain/hunter/projects/ippicv/20151201/2252c08/ippicv_linux_20151201.tgz;http://allowed-source1.domain;http://allowed-source2.domain/ippicv/20151201/2252c08/ippicv_linux_20151201.tgz;http://allowed-source3.domain/ippicv/20151201/2252c08/ippicv_linux_20151201.tgz' failed
-- [hunter] status_code: 22
-- [hunter] status_string: "HTTP response code said error"
-- [hunter] log: Trying 192.168.2.245...
TCP_NODELAY set
URL
/SHA1
. [No]I'm using a shared HUNTER_ROOT directory for concurrent CI builds. The configurations have the same hunter-version, but different compiler or compiler flags therefore a different generated hunter-toolchain file and sha1. They should be able to work concurrently, but only one of the concurrent cmake projects is actually compiling a hunter package, all other instances are waiting for the former
The build folder should be locked per toolchain, not per hunter-version
I would like to update Protobuf to the latest. It had a hunter-package version so that will need rebasing. Please could someone fork the old one with a branch pointing to https://github.com/protocolbuffers/protobuf/releases/tag/v3.10.0 and I will rebase the hunterization patches and test them.
set the default for HUNTER_ENABLED
to OFF
when using Hunter in a project I always disable it. When I open the project in my IDE (QtCreator, vscode) the first time the default cmake-configurations are used, which also includes Hunter. So even if I don't want to use Hunter I have to wait for Hunter to provide me with all dependencies, just to say no thank you afterwards
Let's say I have the following cmake directory structure & hunter code:
- proj-root-dir/
- CMakeLists.txt
# initialize hunter-gate etc. here
project(my-project)
add_subdir(app-a)
add_subdir(app-b)
- app-a/
- app-a.cpp
- CMakeLists.txt
# TODO: how get ZLIB 1.2.11-p1 via hunter
???
find_package(ZLIB 1.2.11-p1 EXACT CONFIG REQUIRED)
add_executable(app-a app-a.cpp)
target_link_libraries(app-a PRIVATE ZLIB::zlib)
- app-b/
- app-b.cpp
- CMakeLists.txt
# TODO: how get ZLIB 1.2.8-hunter via hunter
???
find_package(ZLIB 1.2.8-hunter EXACT CONFIG REQUIRED)
add_executable(app-b app-b.cpp)
target_link_libraries(app-b PRIVATE ZLIB::zlib)
There are two different versions of ZLIB used in the same cmake project, which is not possible with hunter ?! Am I getting this right ?
What are ways to do this, i.e. have different versions of the same package being used by multiple different cmake-targets under the same cmake-project ?
Thanks
shaderc
This package has next dependencies:
glslang
(required, available in Hunter: https://docs.hunter.sh/en/latest/packages/pkg/glslang.html)spirv-cross
(required, available in Hunter: https://docs.hunter.sh/en/latest/packages/pkg/spirv-cross.html)hunter_add_package
/find_package
API used by me in the example is the same as in documentation. [Yes]URL
/SHA1
. [Yes]# CMakeLists.txt
cmake_minimum_required(VERSION 3.2)
include(cmake/HunterGate.cmake)
HunterGate(
URL "https://github.com/cpp-pm/hunter/archive/v0.23.240.tar.gz"
SHA1 "ca19f3769e6c80cfdd19d8b12ba5102c27b074e0"
LOCAL
)
project(hunter-curl
VERSION 1.0.0
LANGUAGES CXX
)
hunter_add_package(CURL)
find_package(CURL CONFIG REQUIRED)
Here is the log until first error reported by Hunter, option HUNTER_STATUS_DEBUG
is ON
:
I've checked that the first error in logs IS NOT external.build.failed
. [Yes]
I'm using the next command line on generate step:
cmake -H. -Bbuild -GXcode -DHUNTER_STATUS_DEBUG=true
-lsocket
, which does not exist on macOS because socket-interfaces are part of libc
. This might be a hint that the build is not configured correctly for macOS. Output from CMakeError.log: https://pastebin.com/41JAVN2V7.60.0-p0
) does not help.3.15.5
) does not help.The current state of the world for CI in Hunter is as follows:
A new approach that should streamline how we test packages:
cmake/projects/
foldercmake/projects/
or examples/
, the package(s) being changed is noted. The list of packages being changed in a given PR can be empty (ie. changes to core Hunter only), but will generally be length 1.Summary:
We would no longer have to use ingenue/hunter
, and instead would run CI for the packages being changed directly on the PR against hunter proper
I need a fork of https://github.com/hunter-packages/lua to https://github.com/cpp-pm/lua repo in order to update the changes needed for the latest version.
OpenCV 4.0.0 package is already there. It will be useful to also add support for 4.1.1.
Trying to figure out how to do it with help from @headupinclouds . Pls. assign the task to me
I have been using FetchContent_MakeAvailable(SetupHunter)
with multiple different packages successfully already, but now I tried it with Boost and it failed with the following errors:
CMake Error at C:/.hunter/_Base/b67e11d/083dd95/9877faf/Install/lib/cmake/Boost/BoostConfig.cmake:4 (include):
include could not find load file:
hunter_check_toolchain_definition
Call Stack (most recent call first):
CMakeLists.txt:15 (find_package)
CMake Error at C:/.hunter/_Base/b67e11d/083dd95/9877faf/Install/lib/cmake/Boost/BoostConfig.cmake:7 (include):
include could not find load file:
hunter_internal_error
Call Stack (most recent call first):
CMakeLists.txt:15 (find_package)
CMake Error at C:/.hunter/_Base/b67e11d/083dd95/9877faf/Install/lib/cmake/Boost/BoostConfig.cmake:8 (include):
include could not find load file:
hunter_status_debug
Call Stack (most recent call first):
CMakeLists.txt:15 (find_package)
[hunter ** INTERNAL **] Unexpected empty string
[hunter ** INTERNAL **] [Directory:C:/.hunter/_Base/b67e11d/083dd95/9877faf/Install/lib/cmake/Boost]
------------------------------ ERROR -----------------------------
/error.internal.html
------------------------------------------------------------------
CMake Error at C:/.hunter/_Base/Download/Hunter/0.23.234/b67e11d/Unpacked/cmake/modules/hunter_error_page.cmake:12 (message):
Call Stack (most recent call first):
C:/.hunter/_Base/Download/Hunter/0.23.234/b67e11d/Unpacked/cmake/modules/hunter_internal_error.cmake:13 (hunter_error_page)
C:/.hunter/_Base/Download/Hunter/0.23.234/b67e11d/Unpacked/cmake/modules/hunter_assert_not_empty_string.cmake:9 (hunter_internal_error)
C:/.hunter/_Base/Download/Hunter/0.23.234/b67e11d/Unpacked/cmake/modules/hunter_check_toolchain_definition.cmake:46 (hunter_assert_not_empty_string)
C:/.hunter/_Base/b67e11d/083dd95/9877faf/Install/lib/cmake/Boost/BoostConfig.cmake:43 (hunter_check_toolchain_definition)
CMakeLists.txt:15 (find_package)
The CMakeLists.txt looks like follows:
cmake_minimum_required(VERSION 3.2)
set(HUNTER_Boost_COMPONENTS chrono date_time)
set(HUNTER_PACKAGES Boost)
set(HUNTER_Boost_VERSION 1.71.0-p0)
# option(HUNTER_NO_TOOLCHAIN_ID_RECALCULATION "" ON)
include(FetchContent)
FetchContent_Declare(SetupHunter GIT_REPOSITORY https://github.com/cpp-pm/gate)
FetchContent_MakeAvailable(SetupHunter)
project(use-pkg-components)
find_package(Boost CONFIG REQUIRED chrono date_time)
add_executable(use-pkg-components main.cpp)
target_link_libraries(use-pkg-components PRIVATE
Boost::chrono
Boost::date_time
)
Interestingly the same basic setup works fine when I manually download & set up HunterGate.cmake:
cmake_minimum_required(VERSION 3.2)
set(HUNTER_Boost_COMPONENTS chrono date_time)
set(HUNTER_PACKAGES Boost)
set(HUNTER_Boost_VERSION 1.71.0-p0)
# option(HUNTER_NO_TOOLCHAIN_ID_RECALCULATION "" ON)
include("cmake/HunterGate.cmake")
HunterGate(
URL "https://github.com/cpp-pm/hunter/archive/v0.23.234.tar.gz"
SHA1 "b67e11d7e9ee503e9f6e1b45eb1ef7bf2fb31279"
)
project(use-pkg-components)
hunter_add_package(Boost COMPONENTS chrono date_time)
find_package(Boost CONFIG REQUIRED chrono date_time)
add_executable(use-pkg-components main.cpp)
target_link_libraries(use-pkg-components PRIVATE
Boost::chrono
Boost::date_time
)
Any ideas what could be the issue ?
Thanks
zstd has the CMakeLists.txt project file in the subdirectory build/cmake
. Add support for the SOURCE_SUBDIR
parameter of the ExternalProject_Add cmake command
I suggest to add two functions hunter_source_dir
and hunter_get_source_dir()
just like hunter_cmake_args and hunter_get_cmake_args
I've already created a dummy project and added it to the cmake_in_subdir branch of my fork
ref: #91
hunter_add_package
/find_package
API used by me in the example is the same as in documentation. [Yes]URL
/SHA1
. [Yes]The hunter docs say version 0.19 (e.g. in titlebar) see here.
The value is defined in docs/conf.py. Is there any way to get it to pick the version from the git tag or something?
This was mentioned in a discussion somewhere. Maybe nlohmann_json, rather than downloading the whole repo, which is large, should download just the header (which is KBs) instead?
SPIRV-Tools
This package has next dependencies:
SPIRV-Headers
(required, available in Hunter: https://docs.hunter.sh/en/latest/packages/pkg/SPIRV-Headers.html)I'm getting the error Unexpected empty string
, originating from
HUNTER_CONFIGURATION_TYPES
manually.
I do not get an error if I use the manual method.
hunter_add_package
/find_package
API used by me in the example is the same as in documentation. YesURL
/SHA1
. Yes# CMakeLists.txt
cmake_minimum_required(VERSION 3.14)
set(HUNTER_PACKAGES PocoCpp)
include(FetchContent)
FetchContent_Declare(SetupHunter GIT_REPOSITORY https://github.com/cpp-pm/gate)
FetchContent_MakeAvailable(SetupHunter)
project(foo)
find_package(Poco REQUIRED Foundation CONFIG)
Here is the log until first error reported by Hunter, option HUNTER_STATUS_DEBUG
is ON
:
I've checked that the first error in logs IS NOT external.build.failed
. Yes
I'm using the next command line on generate step:
cmake -DHUNTER_STATUS_DEBUG=ON
I have a cmake hunterised fork of zstd at https://github.com/ned14/zstd, and a cmake hunterised fork of asio at https://github.com/ned14/asio
How do you guys want it contributed given that I assume hunter-packages is no longer open?
As mentioned in #62, machine-specific instructions in tuned code (ex. AVX2 instructions) could be cached and saved in Hunter, then distributed to end users that may not have AVX2 capabilities. Perhaps the correct thing to do is add architecture capabilities to the toolchain hash, but that would cause many other packages to be duplicated in cache.
No bug or anything, just wanted to say
Thank you for adding the changes into the releases! It makes my live MUCH easier!
FLAC
This package has next dependencies:
libogg
(optional, available in Hunter: https://cpp-pm-hunter.readthedocs.io/en/latest/packages/pkg/libogg.html)hdf5
to hunter. It is a C++/Fortran/Java library to interact with hdf / h5 files. HDF5 is a standard hierarchical data file format commonly used to store raw sensor data as well as metadata.Only two dependencies were required ZLIB & szip, both on hunter (hence the hunterisation):
ZLIB
(available in Hunter: https://docs.hunter.sh/en/latest/packages/pkg/ZLIB.html)szip
(available in Hunter: https://docs.hunter.sh/en/latest/packages/pkg/szip.html)Hi. I have started to experiment with hunter some days ago and I really like the general concept of it being implemented completely in CMake without any dependencies. Not having to introduce yet another tool/technology into someone's tool stack is always a big plus in my opinion 😊.
My current understanding is, that if someone wants to publish a new package or a new version of a package, this always requires modification of the hunter source code in cmake/projects/mypkg/hunter.cmake
and cmake/configs/default.cmake
(see: https://docs.hunter.sh/en/latest/creating-new/create/cmake.html)
Or in other words, the package repository manifest is currently baked into the package manager source code, so to publish a new/updated package always also requires all users to also update their package manager version (i.e. via HunterGate, SHA etc.)
While I can see in the documentation that there went some thought into this, I still find it odd that this is the default workflow for creating/updating packages. And also this might be one of the major factors that already might limit the adoption of hunter for more widespread use in the community.
If you compare this to other package management ecosystems this is a very heavily moderated and slow process, whereas in npm/nuget/etc. someone can just go ahead, register a new account and be publishing numerous packages within minutes.
The second, but closely related point that I'd like to bring up is hosting / using of private package collections. In a private workspace it is even more likely that the frequency in which packages are updated is even higher than for public ones. But also in this scenario an update to a single package always requires each of the consumers to download & cache the entire hunter-vX.Y.Z.tar.gz (currently ~4mb according to the latest release), and this is only for the build system to know that there actually ARE packages that have updates.
I am currently digging & hacking through the hunter / hunter-gate sources to try and find my own "clever" workarounds to make hunter more interactive / agile, but by posting this here I'd like to know thoughts of other hunter users / the maintainers on those topics.
I really love the idea of having just CMake and being able to use packages without any other tool (like conan, vcpkg, etc.) ... but for serious day-to-day use I think this general design needs some rethinking.
What are your thoughts ?
I'm interested in package OpenEXR
Here is the official site of package https://www.openexr.com/
This package is using [Git]: https://github.com/AcademySoftwareFoundation/openexr
Used build system: [CMake]
This package has next dependencies:
IlmBase
(part of openexr download)ZLIB
In hunterHere is the package request from old hunter https://github.com/ruslo/hunter/issues/361
I have already got this working in a test branch (thanks to the great work done upstream in improving their CMake build system recently). I have 3 PRs open upstream taken from my hunterize-2 branch.
I will need a fork in hunter-packages to add the hunter_add_package
and HunterGate
on top of those commits (which hopefully will be absorbed upstream).
set HUNTER_STATUS_PRINT
by default to OFF
The Hunter messages are only interesting in the case of errors, otherwise they are just cluttering up the CI build jobs
gate is looking for HunterGate.cmake
in the root of the build dir, but it is in _deps/setuphunter-src/cmake/HunterGate.cmake
.
hunter_add_package
/find_package
API used by me in the example is the same as in documentation. Did not use themURL
/SHA1
. Yes# CMakeLists.txt
cmake_minimum_required(VERSION 3.14)
include(FetchContent)
FetchContent_Declare(SetupHunter GIT_REPOSITORY https://github.com/cpp-pm/gate)
FetchContent_MakeAvailable(SetupHunter)
project(foo)
add_executable(foo foo.cpp)
Here is the log until first error reported by Hunter, option HUNTER_STATUS_DEBUG
is ON
:
I've checked that the first error in logs IS NOT external.build.failed
. Yes
I'm using the next command line on generate step:
cmake -DHUNTER_ENABLED=YES -DHUNTER_STATUS_DEBUG=ON
I cannot reach docs.hunter.sh
or hunter.sh
anymore. This is not isolated to my machine or internet connection.
hunter_add_package
/find_package
API used by me in the example is the same as in documentation. YesURL
/SHA1
. Yes# CMakeLists.txt
cmake_minimum_required(VERSION 3.10)
include("cmake/HunterGate.cmake")
HunterGate(
URL "https://github.com/cpp-pm/hunter/archive/v0.23.217.tar.gz"
SHA1 "4b36c0f8ffc8f3b5718d5e24629fb40c56c99b13"
LOCAL
)
project(GettingStarted)
hunter_add_package(lehrfempp)
find_package(lehrfempp CONFIG REQUIRED)
add_executable(getting_started main.cc)
target_link_libraries(getting_started LF::lf.base)
# cmake/Hunter/config.cmake
hunter_config(lehrfempp
URL "https://github.com/craffael/lehrfempp/archive/20bf18775ff80f227abea649a87683b1b3d62399.tar.gz"
SHA1 "be08de982ad28a55f9512874f832e3718af684a3"
)
Here is the log until first error reported by Hunter, option HUNTER_STATUS_DEBUG
is ON
:
I've checked that the first error in logs IS NOT external.build.failed
. Yes
I'm building on Linux
I'm using system CMake
CMake version: 3.10.2
I'm not using toolchain
I'm using the next command line on generate step:
cmake -H. -Bbin
In this testcase I'm including the package lehrfempp. The lehrfempp package in turn depends again on Boost::program_options . If I omit the hunter_config
directive, everything works as expected but I don't get the version that I want. If I use the hunter_config
directive, hunter seems to download the correct version of lehrfempp but then later on the find_package call fails.
I am in a position where I could do with the Python (as well as the C++) interface included in the hunter version of Protobuf. brew install protobuf
includes the python bindings too for example, see here.
I am not an expert in Python so I am not clear on the exact stages to this but I think we have a few options:
I posted this on Gitter too (thought an issue might be better).
I want to update sqlite to 3.30.1. I see that there is https://github.com/hunter-packages/sqlite3 with cmake additions. This repo has not been taken under the new cpp-pm umbrella as far as I can tell. Would this need to be migrated to the cpp-pm organization or should I create a new PR to the old repo for updating the code?
Moreover as there is an autotools scheme in hunter and sqlite is build using autotools AFAIK, I am wondering if I should attempt to switch this package to a different scheme and ditch the project fork repo for sqlite. I am not sure how to find and trace the original reasons for the fork.
https://github.com/assimp/assimp/releases/tag/v5.0.0 (2d2889f)
I think it's very important update:
Implemented basic PBR materials into assimp.
This adds the following texture types:
BASE_COLOR
NORMAL_CAMERA
EMISSION_COLOR
METALNESS
DIFFUSE_ROUGHNESS
Add support for importing GLTF2 animations.
Use github actions to integrate CI in this repo.
The benefits of doing this:
When can we start adding new packages?
Intel Media SDK
I'm interested to update mysql-client
, i would need some help tho.
Here is the current version https://github.com/hunter-packages/mysql-client>
This package is using already hunterized but its old and may be not hunterzed as it should>
Some interesting links
Main problem:
Linux osboxes 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11) x86_64 GNU/Linux
8.3.0 (Debian 8.3.0-6)
3.13.4
Error is :
[ 65%] Building C object mysys/CMakeFiles/mysys.dir/my_lib.c.o
/home/cybermomo/cmangos/hunter/_Base/e998928/688591e/4b09d2b/Build/MySQL-client/Source/mysys/my_lib.c: In function ‘my_dir’:
/home/cybermomo/cmangos/hunter/_Base/e998928/688591e/4b09d2b/Build/MySQL-client/Source/mysys/my_lib.c:127:3: error: ‘readdir_r’ is deprecated [-Werror=deprecated-declarations]
while (!(READDIR(dirp,(struct dirent*) dirent_tmp,dp)))
^~~~~
In file included from /usr/include/features.h:424,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:27,
from /home/cybermomo/cmangos/hunter/_Base/e998928/688591e/4b09d2b/Build/MySQL-client/Source/include/my_global.h:41,
from /home/cybermomo/cmangos/hunter/_Base/e998928/688591e/4b09d2b/Build/MySQL-client/Source/mysys/mysys_priv.h:19,
from /home/cybermomo/cmangos/hunter/_Base/e998928/688591e/4b09d2b/Build/MySQL-client/Source/mysys/my_lib.c:19:
/usr/include/dirent.h:189:12: note: declared here
extern int __REDIRECT (readdir_r,
^~~~~~~~~~
cc1: all warnings being treated as errors
hunter_config(MySQL-client VERSION 6.1.9-p1 CMAKE_ARGS CMAKE_CXX_FLAGS=-Wno-error=deprecated-declarations)
without success (look like the flag is discarded somewhere)
Hello,
The introduction of ALIAS of imported targets in hunter (and in particular in zlib, png and freetype) has elevated the CMake minimum version requirement. The minimum version should be now 3.11 and not 3.2.
Demonstration of the issue (cmake 3.10.3):
Github bug repository
Travis: link
Thank you!
-Nasos
Edit:typo
Reported by @michaeldkroener on PR #113
Getting
Imported target "Boost::boost" includes non-existent path"/root/.hunter/_Base/503b149/b014198/cbc5d16/Source"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
The path was deleted, renamed, or moved to another location. An install or uninstall procedure did not complete successfully. The installation package was faulty and references files it does not provide.
https://github.com/cpp-pm/gate project's description points to the original Hunter project. It should be updated to cpp-pm/hunter
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.