1 # This file introduces a templates for calling write_cmake_config.py.
3 # write_cmake_config behaves like CMake's configure_file(), but runs at build
4 # time, not at generator time. See write_cmake_config.py for details.
8 # input (required) [string]
10 # output (required) [string]
12 # values (required) [list of strings]
13 # Each entry is a '='-separated key-value pair used for substitution.
17 # write_cmake_config("attributes_compat_func_gen") {
18 # input = "Version.inc.in"
19 # output = "$root_gen_dir/clang/include/clang/Basic/Version.inc",
21 # "CLANG_VERSION=$llvm_version",
25 template("write_cmake_config") {
26 assert(defined(invoker.input), "must set 'input' in $target_name")
27 assert(defined(invoker.output), "must set 'output' in $target_name")
28 assert(defined(invoker.values), "must set 'values' in $target_name")
31 script = "//llvm/utils/gn/build/write_cmake_config.py"
41 rebase_path(outputs[0], root_build_dir),
42 rebase_path(sources[0], root_build_dir),
45 forward_variables_from(invoker,