diff options
author | Keno Fischer <keno@alumni.harvard.edu> | 2019-07-15 19:04:04 +0000 |
---|---|---|
committer | Keno Fischer <keno@alumni.harvard.edu> | 2019-07-15 19:04:04 +0000 |
commit | 42e90ed7717e09a1e0fb21027e8346707b60c896 (patch) | |
tree | 6467bd0e28c4b35cf25a58cb6cd2101c413a6966 /llvm/cmake/modules | |
parent | ac6375d99d19e2c8c53dc72caa457833f6fa6641 (diff) | |
download | bcm5719-llvm-42e90ed7717e09a1e0fb21027e8346707b60c896.tar.gz bcm5719-llvm-42e90ed7717e09a1e0fb21027e8346707b60c896.zip |
[cmake] Don't set install rules for tblgen if building utils is disabled
Summary:
This is a follow up to D64032. Afterwards if building utils is disabled
and cross compilation is attempted, CMake will complain that adding
`install()` directives to targets with EXCLUDE_FROM_ALL set is "undefined".
Indeed, it appears depending on the CMake version and the selected
Generator, the install rule will error because the underlying target isn't
built. Fix that by not adding the install rule if building utils is not
requested. Note that this doesn't prevent building tblgen as a
dependency in not cross-build, even if building tools is disabled.
Reviewed By: smeenai
Differential Revision: https://reviews.llvm.org/D64225
llvm-svn: 366108
Diffstat (limited to 'llvm/cmake/modules')
-rw-r--r-- | llvm/cmake/modules/TableGen.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/cmake/modules/TableGen.cmake b/llvm/cmake/modules/TableGen.cmake index f15a23b6245..36c026b5c0f 100644 --- a/llvm/cmake/modules/TableGen.cmake +++ b/llvm/cmake/modules/TableGen.cmake @@ -147,7 +147,7 @@ macro(add_tablegen target project) endif() endif() - if (${project} STREQUAL LLVM AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + if (${project} STREQUAL LLVM AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY AND LLVM_BUILD_UTILS) set(export_to_llvmexports) if(${target} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR NOT LLVM_DISTRIBUTION_COMPONENTS) |