[PATCH] D132608: [CMake] Clean up CMake binary dir handling

John Ericson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 14 20:01:09 PDT 2022


Ericson2314 added a comment.

@tianshilei1992 that is a fair point. I would be open to calling them something else.

I just don't want to call them `LLVM_*` because that would be confusing since there is (a) LLVM in particular (b) the monorepo / project as a whole, and this variable are about *neither* of them, being scoped to the current build.

I mainly named this way to match the`GNUInstallDirs` naming scheme, where `CMAKE_INSTALL_PREFIX` goes with` CMAKE_INSTALL_*DIR`; here `CMAKE_BINARY_DIR` goes with `CMAKE_BINARY_*DIR`. I admit relative vs absolute paths, in addition to `_PREFIX` vs `_DIR`, do not make the analogy exact though.

I also was hoping something like this could be upstreamed into CMake itself, but using different names now doesn't prevent upstream from adopting `CMAKE_*` were this to become official.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132608



More information about the cfe-commits mailing list