JDevlieghere created this revision. JDevlieghere added reviewers: stella.stamenova, zturner, davide. Herald added subscribers: jkorous, mgorny.
Because we can't expand generator expressions for the lit tests, we need to set the path to the debugserver in the `_STR` variable so it's expanded properly without breaking multi-target generators such as MSVC and Xcode. Repository: rL LLVM https://reviews.llvm.org/D46334 Files: test/CMakeLists.txt Index: test/CMakeLists.txt =================================================================== --- test/CMakeLists.txt +++ test/CMakeLists.txt @@ -134,11 +134,13 @@ --env ARCHIVER=${CMAKE_AR} --env OBJCOPY=${CMAKE_OBJCOPY}) endif() -# In some cases, DEBUGSERVER_PATH is expressed as $<TARGET_FILE:debugserver>. This won't work in the -# LLDB_DOTEST_ARGS_STR when using a generator that supports multiple configurations such as Visual Studio, -# but since debugserver is currently confined to Darwin/Apple, we can leave it as is. if(CMAKE_HOST_APPLE) - list(APPEND LLDB_TEST_COMMON_ARGS --server ${DEBUGSERVER_PATH}) + if (DEBUGSERVER_PATH STREQUAL "$<TARGET_FILE:debugserver>") + list(APPEND LLDB_EXECUTABLE_PATH_ARGS --server ${DEBUGSERVER_PATH}) + list(APPEND LLDB_EXECUTABLE_PATH_ARGS_STR --server ${LLVM_RUNTIME_OUTPUT_INTDIR}/debugserver${CMAKE_EXECUTABLE_SUFFIX}) + else() + list(APPEND LLDB_TEST_COMMON_ARGS --server ${DEBUGSERVER_PATH}) + endif() endif() if(SKIP_DEBUGSERVER)
Index: test/CMakeLists.txt =================================================================== --- test/CMakeLists.txt +++ test/CMakeLists.txt @@ -134,11 +134,13 @@ --env ARCHIVER=${CMAKE_AR} --env OBJCOPY=${CMAKE_OBJCOPY}) endif() -# In some cases, DEBUGSERVER_PATH is expressed as $<TARGET_FILE:debugserver>. This won't work in the -# LLDB_DOTEST_ARGS_STR when using a generator that supports multiple configurations such as Visual Studio, -# but since debugserver is currently confined to Darwin/Apple, we can leave it as is. if(CMAKE_HOST_APPLE) - list(APPEND LLDB_TEST_COMMON_ARGS --server ${DEBUGSERVER_PATH}) + if (DEBUGSERVER_PATH STREQUAL "$<TARGET_FILE:debugserver>") + list(APPEND LLDB_EXECUTABLE_PATH_ARGS --server ${DEBUGSERVER_PATH}) + list(APPEND LLDB_EXECUTABLE_PATH_ARGS_STR --server ${LLVM_RUNTIME_OUTPUT_INTDIR}/debugserver${CMAKE_EXECUTABLE_SUFFIX}) + else() + list(APPEND LLDB_TEST_COMMON_ARGS --server ${DEBUGSERVER_PATH}) + endif() endif() if(SKIP_DEBUGSERVER)
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits