[Lldb-commits] [PATCH] D57750: [CMake] Don't add `cxx` to `LLDB_TEST_DEPS` if it doesn't exist.
Dan Liew via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 5 06:32:28 PST 2019
delcypher created this revision.
delcypher added reviewers: sgraenitz, JDevlieghere.
Herald added a subscriber: mgorny.
Herald added a project: LLDB.
If we forget to build `libcxx` then previously the CMake configure
would have errors like:
CMake Error at
/Users/dan/data/dev/llvm/upstream_monorepo/master/llvm/llvm/cmake/modules/AddLLVM.cmake:1374
(add_dependencies):
The dependency target "cxx" of target
"check-lldb-tools-lldb-mi-data-inputs" does not exist.
Call Stack (most recent call first):
/Users/dan/data/dev/llvm/upstream_monorepo/master/llvm/llvm/cmake/modules/AddLLVM.cmake:1426
(add_lit_target)
/Users/dan/data/dev/llvm/upstream_monorepo/master/llvm/lldb/lit/CMakeLists.txt:76
(add_lit_testsuites)
To avoid error this check the `cxx` target exists before adding it to
`LLDB_TEST_DEPS`. If it doesn't exist emit a warning similar to the
code above.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D57750
Files:
lldb/CMakeLists.txt
Index: lldb/CMakeLists.txt
===================================================================
--- lldb/CMakeLists.txt
+++ lldb/CMakeLists.txt
@@ -111,7 +111,11 @@
message(WARNING "LLDB test suite requires libc++ in llvm/projects/libcxx or an existing build symlinked to ${cxx_dir}")
endif()
else()
- list(APPEND LLDB_TEST_DEPS cxx)
+ if (NOT TARGET cxx)
+ message(WARNING "LLDB test suite requires libc++")
+ else()
+ list(APPEND LLDB_TEST_DEPS cxx)
+ endif()
endif()
endif()
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57750.185299.patch
Type: text/x-patch
Size: 573 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190205/5bee97ce/attachment.bin>
More information about the lldb-commits
mailing list