[PATCH] D50135: [libunwind] [CMake] Allow building standalone without any llvm-config available
Martin Storsjö via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 2 13:41:03 PDT 2018
mstorsjo added inline comments.
================
Comment at: CMakeLists.txt:363
-add_subdirectory(test)
+if (EXISTS ${LLVM_CMAKE_PATH})
+ add_subdirectory(test)
----------------
phosek wrote:
> libcxx seems to be using a different condition: `IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test"`, should this be unified?
Maybe, but there's more to it than that. libunwind's `test/CMakeLists.txt` will unconditionally try to do `include(AddLLVM)`, which fails if `LLVM_CMAKE_PATH` isn't set. libcxx's `test/CMakeLists.txt` on the other hand will only try to do that if `LIBCXX_INCLUDE_TESTS` is defined, which it isn't by default.
There's lots of the llvm/cmake handling that seems to be quite outdated in libunwind compared to libcxxabi/libcxx, but I'm not really volunteering to unify that...
Repository:
rUNW libunwind
https://reviews.llvm.org/D50135
More information about the cfe-commits
mailing list