From 950ba404bef3a0564399d96da09bf78ff0965d09 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 22 Jul 2020 02:17:10 +0100 Subject: fix(3p/nix): Fix string escaping issue in schema include The SQL schemas are included as string constants which are concatenated into a header file. In the previous Makefiles, this was done with envsubst or something - we moved it to CMake. There was a missing quote around the string to be interpolated, which meant that CMake interpreted the semicolons as part of its language syntax and did not emit them. Change-Id: Ibb4512788b26b53f297db3535094dc0194614446 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1342 Reviewed-by: kanepyork Reviewed-by: glittershark Tested-by: BuildkiteCI --- third_party/nix/src/libstore/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'third_party/nix/src') diff --git a/third_party/nix/src/libstore/CMakeLists.txt b/third_party/nix/src/libstore/CMakeLists.txt index 705be9574d2f..bfc6b4eb5947 100644 --- a/third_party/nix/src/libstore/CMakeLists.txt +++ b/third_party/nix/src/libstore/CMakeLists.txt @@ -13,11 +13,11 @@ file(READ "schema.sql" NIX_SCHEMA) string(CONFIGURE "#pragma once namespace nix { - constexpr char kNixSqlSchema[] = R\"(${NIX_SCHEMA})\"\; + constexpr char kNixSqlSchema[] = R\"(${NIX_SCHEMA})\"; }" NIX_SCHEMA_GEN) -file(WRITE ${PROJECT_BINARY_DIR}/generated/schema.sql.hh ${NIX_SCHEMA_GEN}) +file(WRITE ${PROJECT_BINARY_DIR}/generated/schema.sql.hh "${NIX_SCHEMA_GEN}") set(HEADER_FILES binary-cache-store.hh -- cgit 1.4.1