diff options
Diffstat (limited to 'lldb/CMakeLists.txt')
-rw-r--r-- | lldb/CMakeLists.txt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lldb/CMakeLists.txt b/lldb/CMakeLists.txt index 64807daa795..af7c31295ed 100644 --- a/lldb/CMakeLists.txt +++ b/lldb/CMakeLists.txt @@ -124,6 +124,24 @@ if(LLDB_INCLUDE_TESTS) message(WARNING "LLDB test suite requires libc++ in llvm/projects/libcxx or an existing build symlinked to ${cxx_dir}") endif() else() + # We require libcxx for the test suite, so if we aren't building it, + # try to provide a helpful error about how to resolve the situation. + if(NOT TARGET cxx) + if(LLVM_ENABLE_PROJECTS STREQUAL "") + # If `LLVM_ENABLE_PROJECTS` is not being used (implying that we are + # using the old layout), suggest checking it out. + message(FATAL_ERROR + "LLDB test suite requires libc++, but it is currently disabled. " + "Please checkout `libcxx` in `llvm/projects` or disable tests " + "via `LLDB_INCLUDE_TESTS=OFF`.") + else() + # If `LLVM_ENABLE_PROJECTS` is being used, suggest adding it. + message(FATAL_ERROR + "LLDB test suite requires libc++, but it is currently disabled. " + "Please add `libcxx` to `LLVM_ENABLE_PROJECTS` or disable tests " + "via `LLDB_INCLUDE_TESTS=OFF`.") + endif() + endif() list(APPEND LLDB_TEST_DEPS cxx) endif() endif() |