diff options
author | Martin Storsjö <martin@martin.st> | 2021-09-10 14:36:13 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2021-09-29 21:37:28 +0300 |
commit | 565d45541f860d72b2e2f12001104edd78f5b0c3 (patch) | |
tree | bd81e2cdded7970f1ef9f493bf28a227a5451054 /runtimes | |
parent | 2240deb9766cc080b351016b0d7f975d7249b113 (diff) | |
download | llvm-565d45541f860d72b2e2f12001104edd78f5b0c3.tar.gz |
[libcxx] Add a CI configuration for standalone building in llvm-project/runtimes
Generate the llvm-lit script in runtimes/CmakeFiles.txt unless invoked
from llvm/runtimes.
Differential Revision: https://reviews.llvm.org/D109593
Diffstat (limited to 'runtimes')
-rw-r--r-- | runtimes/CMakeLists.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt index 2bde09b71699..506697d3f2cf 100644 --- a/runtimes/CMakeLists.txt +++ b/runtimes/CMakeLists.txt @@ -116,6 +116,8 @@ if (NOT LLVM_DEFAULT_TARGET_TRIPLE) get_host_triple(LLVM_DEFAULT_TARGET_TRIPLE) endif() +option(LLVM_INCLUDE_TESTS "Generate build targets for the runtimes unit tests." ON) + # Use libtool instead of ar if you are both on an Apple host, and targeting Apple. if(CMAKE_HOST_APPLE AND APPLE) include(UseLibtool) @@ -184,6 +186,14 @@ if(LLVM_INCLUDE_TESTS) ARGS ${RUNTIMES_LIT_EXTRA_ARGS} ) add_custom_target(runtimes-test-depends DEPENDS ${RUNTIMES_LIT_DEPENDS}) + + if (NOT HAVE_LLVM_LIT) + # If built by manually invoking cmake on this directory, we don't have + # llvm-lit. If invoked via llvm/runtimes, the toplevel llvm cmake + # invocation already generated the llvm-lit script. + add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/llvm-lit + ${CMAKE_CURRENT_BINARY_DIR}/llvm-lit) + endif() endif() get_property(SUB_COMPONENTS GLOBAL PROPERTY SUB_COMPONENTS) |