METIS
METIS copied to clipboard
Provide MetisConfig.cmake
Providing a cmake config file makes it easier to find and use Metis. Metis should create such a config file. CMake offers some functions to do this without much effort: https://cmake.org/cmake/help/latest/module/CMakePackageConfigHelpers.html
What is the benefit for doing that?
It simplifies the way projects can include and use Metis. If Metis would provide a Metis-cmake.config, all it has to do is to add Find_package(Metis) and if the file is found, all flags and includes are included in the CMake project. Cf. https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html?highlight=config#config-file-packages
I agree with gruenich. It simplifies the usage a lot. I just implemented that in my PR of METIS here. To use METIS in another CMake configured project you can now just write:
find_package(METIS REQUIRED)
...
target_link_libraries(myproject PUBLIC METIS::metis)
@codecircuit Creating a merge request here seems more helpful to me. Then karpys gets a proper diff. Also from a copyright point of view, for projects where I am maintainer, I would prefer an MR instead of copying code myself. Could you be so kind?
Are there any news on this? I was trying to write a Python library that embeds some C++ code that calls metis and a cmake config file would make my life easier. At a first glance, the code written by @codecircuit seems still compatible with the current version of the file. Could it be implemented?
See #79