gnustep / libobjc2

Objective-C runtime library intended for use with Clang.
http://www.gnustep.org/
MIT License
426 stars 116 forks source link

CMakeLists.txt: fixed mistyped name `tsl-robin-map_FOUND` variable. #274

Closed trunkmaster closed 5 months ago

trunkmaster commented 5 months ago

This change let package maintainers use tsl-robin-map_DIR cmake parameter with path set to cloned and built robin-map repo.

davidchisnall commented 5 months ago

Great catch, thanks! I wonder if we should do a 2.2.1 to incorporate this. I completely missed it in review.

davidchisnall commented 5 months ago

FYI: Part of the motivation for this change (modulo the bug that you've fixed) is that package maintainers should be able to use their system-installed version, they shouldn't need to set tsl-robin-map_DIR as long as CMake's search path for packages includes the system install location.

trunkmaster commented 5 months ago

FYI: Part of the motivation for this change (modulo the bug that you've fixed) is that package maintainers should be able to use their system-installed version, they shouldn't need to set tsl-robin-map_DIR as long as CMake's search path for packages includes the system install location.

Not exactly. I mean cloning robin-map github repo, configure, build and after that specify -Dtsl-robin-map_DIR=<directory/where/robin-map/built>. I don't need to install robin-map in that case.

trunkmaster commented 5 months ago

Great catch, thanks! I wonder if we should do a 2.2.1 to incorporate this. I completely missed it in review.

Yes, make a new tag please!

qmfrederik commented 5 months ago

Not exactly. I mean cloning robin-map github repo, configure, build and after that specify -Dtsl-robin-map_DIR=<directory/where/robin-map/built>. I don't need to install robin-map in that case.

The build system should do that for you through FetchContent. So you shouldn't have to manually clone that repo, unless you're looking for a specific version of robin-map?

davidchisnall commented 5 months ago

I presume the use case here is packaging systems that don’t want to add a package for robin map as a build dep, but also don’t allow package builders to connect to the network during the build phase (an entirely sensible security policy).

It’s worth noting that FetchContent has some existing support for this. There are a couple of CMake variables that you can set to tell it not to try downloading and where you’ve downloaded it to. It will then work with the existing path.

qmfrederik commented 5 months ago

That makes sense, thanks for the clarification!