[PATCH] D131367: [CMake] Check CMAKE_CXX_STANDARD and error if it's to old

Tobias Hieta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 8 04:19:12 PDT 2022


thieta added a comment.

In D131367#3705320 <https://reviews.llvm.org/D131367#3705320>, @barannikov88 wrote:

> I myself stumbled upon this caching behavior, and although I knew that the minimum required standard has changed, it was surprising to notice that the project is still being built with -std=c++14.
> Nevertheless, I don't find this change necessary. The minimum requirement does not change often (is this the second time?).
> People will eventually clear the cache, as they once did. Active developers are already aware of the change and it will not take long for them to realize what is the cause of the issue.
>
> I don't have strong objections, only that this slightly complicates already complex build system, and only needed once in a decade.

I agree with a lot of this. Maybe the right thing is to just check if CMAKE_CXX_STANDARD is lower than the required and skip the whole cache check. Since this is a user-configurable setting it would be good to make sure we don't hand the user a foot-gun.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131367/new/

https://reviews.llvm.org/D131367



More information about the llvm-commits mailing list