diff options
author | Nathan Lanza <nathanlanza@gmail.com> | 2024-04-11 16:56:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-11 16:56:31 -0400 |
commit | 44de2bb6949f0ca62a2e16506fe3d91be14e6d23 (patch) | |
tree | 3b5e7232a62e6dece9c3f1279befbd713b62e698 /clang/CMakeLists.txt | |
parent | 1f5d130df85c2d0550dc8687ad0fa1d96856c318 (diff) | |
download | llvm-44de2bb6949f0ca62a2e16506fe3d91be14e6d23.zip llvm-44de2bb6949f0ca62a2e16506fe3d91be14e6d23.tar.gz llvm-44de2bb6949f0ca62a2e16506fe3d91be14e6d23.tar.bz2 |
[CIR][cmake] Add support for cmake variable CLANG_ENABLE_CIR
Introduce a cmake variable that guards the inclusion of ClangIR into the
build of clang. Guard that we aren't trying to build without MLIR. Add
two subdirectories that, as of now, don't do anything.
Reviewers: bcardosolopes, erichkeane, petrhosek, Ericson2314
Reviewed By: bcardosolopes
Pull Request: https://github.com/llvm/llvm-project/pull/86078
Diffstat (limited to 'clang/CMakeLists.txt')
-rw-r--r-- | clang/CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt index 284b2af..f092766 100644 --- a/clang/CMakeLists.txt +++ b/clang/CMakeLists.txt @@ -165,6 +165,13 @@ if(CLANG_ENABLE_LIBXML2) endif() endif() +if(CLANG_ENABLE_CIR) + if (NOT "${LLVM_ENABLE_PROJECTS}" MATCHES "MLIR|mlir") + message(FATAL_ERROR + "Cannot build ClangIR without MLIR in LLVM_ENABLE_PROJECTS") + endif() +endif() + include(CheckIncludeFile) check_include_file(sys/resource.h CLANG_HAVE_RLIMITS) |