#274 - small tweaks in cmake#275
Conversation
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
|
||
| cmake_minimum_required(VERSION 3.25) | ||
| cmake_minimum_required(VERSION 3.28...4.2) |
There was a problem hiding this comment.
3.28 is minimum for modules -- we should have that as minimum now
There was a problem hiding this comment.
Sorry for commenting on closed PRs, we seems to be pretty aggressive on CMake versions, would this hurt our adaptability?
There was a problem hiding this comment.
Maybe-- but I think it's worth it for two reasons:
- Consumers of these libraries probably need to build with fairly recent compilers/standards anyway because of the fact that these libraries are targeting standardization, so they're more likely to have up to date build tooling
- CMake has been getting important features recently-- for example, even without modules, we need to require 3.28 because we use FILE_SETs now, which are much cleaner than previous mechanisms
There was a problem hiding this comment.
I'd also mention that most libraries are header only and we ignore the user drops headers into their project method of installing at your own risk. Which is to say, consumers don't necessarily use the cmake at all.
There was a problem hiding this comment.
I thought that use case is very "undefined" and not supported?
There was a problem hiding this comment.
Well I think that's one persons view, not necessarily the consensus. And for me it should be a goal for a header only library to support as it's a frequent way to consume header only libraries. cmake is 100% our standard for bulding, packaging, and ci -- but that shouldn't prevent other common use cases. Let's say I had a Bazel project and I"m going to do the work to integrate it. For header only that means simply copy the files and putting them somewhere and doing and include. We might even want it for our own purposes. If I wanted to make an 'all the views super project' for beman I'd just need to clone the headers...
|
Also, we seem to have an error here -- after repo clone an cookie cutter |
|
Can you provide more context on what this is? |
Sure -- basically if you check out examplar and run cookie cutter to change your project name CI will fail when you push. That's because of the missing include for the cmake. Specifically this: This was caused by an infra PR that added the library install change. But also, there's other small changes here that fit the best practices being used in other Beman repos. Changes I made by hand when recently creating another repo. Note that these things are independent of @ednolan PR which would have been useful to me as well. |
When reviewing the take_before repo I found some issues.