From 9fcc64726a9ea659c3fe3dd3f8bbeb826beaaac5 Mon Sep 17 00:00:00 2001 From: Alex Denisov <1101.debian@gmail.com> Date: Sat, 16 Apr 2016 06:47:41 +0000 Subject: [PATCH] Replace hardcoded comment at 'lit.site.cfg.in' At the moment almost every lit.site.cfg.in contains two lines comment: ## Autogenerated by LLVM/Clang configuration. # Do not edit! The patch adds variable LIT_SITE_CFG_IN_HEADER, that is replaced from configure_lit_site_cfg with the note and some useful information. llvm-svn: 266515 --- cmake/modules/AddLLVM.cmake | 2 ++ test/Unit/lit.site.cfg.in | 4 ++-- test/lit.site.cfg.in | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index 294e39b77a8..da0182c0c19 100644 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -983,6 +983,8 @@ function(configure_lit_site_cfg input output) set(HOST_CXX "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}") set(HOST_LDFLAGS "${CMAKE_EXE_LINKER_FLAGS}") + set(LIT_SITE_CFG_IN_HEADER "## Autogenerated from ${input}\n## Do not edit!") + configure_file(${input} ${output} @ONLY) endfunction() diff --git a/test/Unit/lit.site.cfg.in b/test/Unit/lit.site.cfg.in index dd8de489513..9d736f473ce 100644 --- a/test/Unit/lit.site.cfg.in +++ b/test/Unit/lit.site.cfg.in @@ -1,7 +1,7 @@ +@LIT_SITE_CFG_IN_HEADER@ + import sys -## Autogenerated by LLVM/Clang configuration. -# Do not edit! config.llvm_src_root = "@LLVM_SOURCE_DIR@" config.llvm_obj_root = "@LLVM_BINARY_DIR@" config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in index 13f5372ef7e..47699e25840 100644 --- a/test/lit.site.cfg.in +++ b/test/lit.site.cfg.in @@ -1,7 +1,7 @@ +@LIT_SITE_CFG_IN_HEADER@ + import sys -## Autogenerated by LLVM/Clang configuration. -# Do not edit! config.host_triple = "@LLVM_HOST_TRIPLE@" config.target_triple = "@TARGET_TRIPLE@" config.llvm_src_root = "@LLVM_SOURCE_DIR@"