diff options
author | Zachary Turner <zturner@google.com> | 2017-09-19 02:46:28 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-09-19 02:46:28 +0000 |
commit | 2205438c1fcbd01d0471879f165c2b26f275dbbd (patch) | |
tree | c54b3b16f7f1c1bf54e2c4750f0dcd473c462fc6 /CMakeLists.txt | |
parent | 805e11b38c54f3175b6f3bf8f99560832358dc50 (diff) |
Fix llvm-lit script generation in libcxx.
Differential Revision: https://reviews.llvm.org/D37997
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@313606 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e402dae66..f2b7f83dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -653,6 +653,7 @@ endif() # # However, since some submission systems strip test/ subdirectories, check for # it before adding it. + if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test") add_subdirectory(test) endif() @@ -660,6 +661,15 @@ if (LIBCXX_INCLUDE_TESTS) add_subdirectory(lib/abi) endif() +if (LIBCXX_STANDALONE_BUILD AND EXISTS "${LLVM_MAIN_SRC_DIR}/utils/llvm-lit") + # Make sure the llvm-lit script is generated into the bin directory, and do + # it after adding all tests, since the generated script will only work + # correctly discovered tests against test locations from the source tree that + # have already been discovered. + add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/llvm-lit + ${CMAKE_CURRENT_BINARY_DIR}/llvm-lit) +endif() + if (LIBCXX_INCLUDE_DOCS) add_subdirectory(docs) endif() |