[Lldb-commits] [PATCH] D39215: Default to using in-tree clang for building test executables
Zachary Turner via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 23 19:20:18 PDT 2017
zturner added a comment.
Ok the issue is that you cant use CMake generator expressions in this way. This should work though:
if (TARGET clang)
set(LLDB_DEFAULT_TEST_COMPILER "${LLVM_BINARY_DIR}/clang${CMAKE_EXECUTABLE_SUFFIX}")
else()
set(LLDB_DEFAULT_TEST_COMPILER "")
endif()
set(LLDB_TEST_COMPILER "${LLDB_DEFAULT_TEST_COMPILER}" CACHE PATH "Compiler to use for building LLDB test inferiors")
if ("${LLDB_TEST_COMPILER}" STREQUAL "")
message(FATAL_ERROR "LLDB test compiler not specified. Tests will not run")
endif()
I think you might be able to do something like:
if (TARGET clang)
get_property(LLDB_DEFAULT_TEST_COMPILER TARGET clang PROPERTY LOCATION)
endif()
as well, but I haven't tried.
https://reviews.llvm.org/D39215
More information about the lldb-commits
mailing list