[PATCH] D46642: [cmake, unittests] Fix the CMake file for the LLDB unittests to support multiple configurations
Stella Stamenova via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 9 08:47:49 PDT 2018
stella.stamenova created this revision.
stella.stamenova added reviewers: labath, asmith, zturner.
Herald added subscribers: llvm-commits, mgorny.
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.
Repository:
rL LLVM
https://reviews.llvm.org/D46642
Files:
unittests/CMakeLists.txt
Index: unittests/CMakeLists.txt
===================================================================
--- unittests/CMakeLists.txt
+++ unittests/CMakeLists.txt
@@ -42,7 +42,7 @@
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 @@
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()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46642.145931.patch
Type: text/x-patch
Size: 950 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180509/5985d75c/attachment.bin>
More information about the llvm-commits
mailing list