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

Sergei Barannikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 7 14:49:29 PDT 2022


barannikov88 added a comment.

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.



================
Comment at: llvm/CMakeLists.txt:68
+  message(WARNING "Resetting cache value for CMAKE_CXX_STANDARD to ${LLVM_REQUIRED_CXX_STANDARD}")
+  unset(CMAKE_CXX_STANDARD CACHE)
+endif()
----------------
This resets the cache variable in the main project, but what about subprojects? Will they also be affected?



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