Make Beman Packageable

If I had to choose, I would go with option 3 since find_package(GTest) is the norm. Also, having a fallback to fetch and build from source isn’t a bad choice. However, if I am not mistaken the proposed way is to provide a toolchain file in the configuration step. This file is usually generated by the package manager, the concept is that you consume packages the way you want your package to be consumed! That way you create a consistent user experience. So, I think failing to find GTest if a toolchain is not provided is not a bad thing at all. CMake should express “what” is needed while package manager should tell “where” and “how” to obtain it. If presets are used, the toolchain file can be provided to a base preset that is inherited by other presets. That way is not a burden during development and the three problems (should be) solved by the package manager.

1 Like