Author: stella.stamenova
Date: Wed May  9 12:58:51 2018
New Revision: 331914

URL: http://llvm.org/viewvc/llvm-project?rev=331914&view=rev
Log:
[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

Modified:
    lldb/trunk/unittests/CMakeLists.txt

Modified: lldb/trunk/unittests/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/CMakeLists.txt?rev=331914&r1=331913&r2=331914&view=diff
==============================================================================
--- lldb/trunk/unittests/CMakeLists.txt (original)
+++ lldb/trunk/unittests/CMakeLists.txt Wed May  9 12:58:51 2018
@@ -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 i
     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()


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to