[Lldb-commits] [lldb] r331277 - [lit] Replace generator expressions in lit.site.cfg
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Tue May 1 09:19:48 PDT 2018
Author: jdevlieghere
Date: Tue May 1 09:19:48 2018
New Revision: 331277
URL: http://llvm.org/viewvc/llvm-project?rev=331277&view=rev
Log:
[lit] Replace generator expressions in lit.site.cfg
The lit site configuration for the test suite can contain generator
expressions such as $<TARGET_FILE:debugserver> that need to be
substituted.
Modified:
lldb/trunk/test/CMakeLists.txt
Modified: lldb/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/CMakeLists.txt?rev=331277&r1=331276&r2=331277&view=diff
==============================================================================
--- lldb/trunk/test/CMakeLists.txt (original)
+++ lldb/trunk/test/CMakeLists.txt Tue May 1 09:19:48 2018
@@ -186,9 +186,21 @@ string(REPLACE ${CMAKE_CFG_INTDIR} ${LLV
string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_TOOLS_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_DOTEST_ARGS_STR "${LLDB_DOTEST_ARGS_STR}")
+# FIXME: A better layering should enable us to access in lit/CMakeLists.txt
configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/../lit/Suite/lit.site.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/../lit/Suite/lit.site.cfg)
+# We need to rename the configured lit.site.cfg so we can expand the generate
+# expressions later and configure_lit_site_cfg remembers the file name.
+file(RENAME
+ ${CMAKE_CURRENT_BINARY_DIR}/../lit/Suite/lit.site.cfg
+ ${CMAKE_CURRENT_BINARY_DIR}/../lit/Suite/lit.site.cfg.configured)
+# We need this to expand the generator expressions.
+file(GENERATE
+ OUTPUT
+ ${CMAKE_CURRENT_BINARY_DIR}/../lit/Suite/lit.site.cfg
+ INPUT
+ ${CMAKE_CURRENT_BINARY_DIR}/../lit/Suite/lit.site.cfg.configured)
# If we're building with an in-tree clang, then list clang as a dependency
# to run tests.
More information about the lldb-commits
mailing list