diff --git a/.gitignore b/.gitignore index 26843a5..65fe6fa 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ compile_commands.json temp.* .vs .cache -build*/ -.idea/ -cmake-build*/ +build*/ +.idea/ +cmake-build*/ +CMakeLists.txt.user diff --git a/include/literals.h b/include/literals.h index e4f0185..accaf34 100644 --- a/include/literals.h +++ b/include/literals.h @@ -1,15 +1,15 @@ #pragma once -static const char *hello_world = R"lit( +static const char *hello_world = &R"lit( #include int %s() { std::cout << "Hello World!\n"; return 0; } -)lit" + 1; // skip initial newline +)lit"[1]; // skip initial newline -static const char *cmake_toml = R"lit( +static const char *cmake_toml = &R"lit( [cmake] version = "3.15" # subdirs = [] @@ -43,4 +43,4 @@ include-directories = ["include"] [[install]] %s = ["%s"] destination = "${CMAKE_INSTALL_PREFIX}/%s" -)lit" + 1; // skip initial newline +)lit"[1]; // skip initial newline diff --git a/src/cmkrlib/gen.cpp b/src/cmkrlib/gen.cpp index c433c2c..d2286bb 100644 --- a/src/cmkrlib/gen.cpp +++ b/src/cmkrlib/gen.cpp @@ -272,7 +272,7 @@ struct Command { CommandEndl operator()(Ts &&...values) { generated = true; ss << indent(depth) << command << '('; - std::initializer_list{print_arg(values)...}; + (void)std::initializer_list{print_arg(values)...}; if (had_newline) ss << '\n'; ss << ")\n";