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()
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()
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits