[runtimes] Allow FOO_TEST_CONFIG to be a relative path
That makes it possible to store that value in a CMake cache if needed.
Differential Revision: https://reviews.llvm.org/D110843
GitOrigin-RevId: 54a8a0d09a572a0581c0755541847e016274e15c
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cee2aa6..366dcc9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -177,7 +177,11 @@
"Do not export any symbols from the static library." OFF)
set(LIBCXXABI_TEST_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/test/lit.site.cfg.in" CACHE STRING
- "The Lit testing configuration to use when running the tests.")
+ "The path to the Lit testing configuration to use when running the tests.
+ If a relative path is provided, it is assumed to be relative to '<monorepo>/libcxx/test/configs'.")
+if (NOT IS_ABSOLUTE "${LIBCXXABI_TEST_CONFIG}")
+ set(LIBCXXABI_TEST_CONFIG "${LIBCXXABI_LIBCXX_PATH}/test/configs/${LIBCXXABI_TEST_CONFIG}")
+endif()
set(LIBCXXABI_TEST_PARAMS "" CACHE STRING
"A list of parameters to run the Lit test suite with.")