From 42ba76c9f62640eaf2f23e7887d147491b699f6a Mon Sep 17 00:00:00 2001 From: Stella Stamenova Date: Wed, 9 May 2018 19:58:51 +0000 Subject: [PATCH] [cmake, unittests] Fix the CMake file for the LLDB unittests to support multiple configurations Summary: The current setup for the unit tests only works correctly when the generator does not support multiple configurations. When the generator supports multiple configurations, the inputs are not copied to the correct per-configuration directory. This change sets up the build to copy the inputs in each configuration directory. Reviewers: labath, asmith, zturner Reviewed By: labath Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D46642 llvm-svn: 331914 --- lldb/unittests/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lldb/unittests/CMakeLists.txt b/lldb/unittests/CMakeLists.txt index 7b8bc67..0cb6fdb 100644 --- a/lldb/unittests/CMakeLists.txt +++ b/lldb/unittests/CMakeLists.txt @@ -42,7 +42,7 @@ function(add_lldb_unittest test_name) add_custom_command( TARGET ${test_name} POST_BUILD - COMMAND "${CMAKE_COMMAND}" -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/Inputs) + COMMAND "${CMAKE_COMMAND}" -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Inputs) target_link_libraries(${test_name} PRIVATE ${ARG_LINK_LIBS}) endfunction() @@ -52,7 +52,7 @@ function(add_unittest_inputs test_name inputs) add_custom_command( TARGET ${test_name} POST_BUILD - COMMAND "${CMAKE_COMMAND}" -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Inputs/${INPUT} ${CMAKE_CURRENT_BINARY_DIR}/Inputs + COMMAND "${CMAKE_COMMAND}" -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Inputs/${INPUT} ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Inputs COMMENT "Copying ${INPUT} to binary directory.") endforeach() endfunction() -- 2.7.4