[PATCH] D51561: [CMake] Add support for unittests that have input files
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 4 11:35:18 PDT 2018
rnk added inline comments.
================
Comment at: llvm/cmake/modules/AddLLVM.cmake:1126
+ TARGET ${test_name}
+ POST_BUILD
+ COMMAND "${CMAKE_COMMAND}" -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Inputs
----------------
These post build commands will only run when the unit test target rebuilds, which means changes to the inputs won't be reflected in the copied files if you edit an input, rebuild, and re-run the test.
Would it be better to embed a path to the Inputs directory in the source directory? That's how lit tests work; they don't copy inputs to the output directory. I don't see why unit tests need to be independent from the source directory.
https://reviews.llvm.org/D51561
More information about the llvm-commits
mailing list