Skip to content

Commit 5104ab8

Browse files
committed
Rename json_compiler to json2cpp
1 parent f6a392f commit 5104ab8

6 files changed

Lines changed: 14 additions & 14 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,4 @@ if(MSVC)
100100
endif()
101101

102102
# set the startup project for the "play" button in MSVC
103-
set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT intro)
103+
set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT json2cpp)

src/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ find_package(docopt CONFIG)
44
find_package(nlohmann_json CONFIG)
55

66
# Generic test that uses conan libs
7-
add_executable(intro main.cpp json_compiler.cpp)
7+
add_executable(json2cpp main.cpp json2cpp.cpp)
88
target_link_libraries(
9-
intro
9+
json2cpp
1010
PRIVATE project_options
1111
project_warnings
1212
docopt::docopt
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "json_compiler.hpp"
1+
#include "json2cpp.hpp"
22
#include <fstream>
33

44
std::string compile(const nlohmann::json &value, std::size_t &obj_count, std::vector<std::string> &lines)
@@ -68,7 +68,7 @@ compile_results compile(const std::string_view document_name, const nlohmann::js
6868
results.hpp.push_back(fmt::format("#ifndef {}_COMPILED_JSON", document_name));
6969
results.hpp.push_back(fmt::format("#define {}_COMPILED_JSON", document_name));
7070

71-
results.hpp.emplace_back("#include <json_compiler/constexpr_json.hpp>");
71+
results.hpp.emplace_back("#include <json2cpp/constexpr_json.hpp>");
7272

7373
results.hpp.push_back(fmt::format("namespace compiled_json::{} {{", document_name));
7474
results.hpp.push_back(fmt::format(" constexpr_json::json get_{}();", document_name));
@@ -82,7 +82,7 @@ compile_results compile(const std::string_view document_name, const nlohmann::js
8282
results.impl.push_back(fmt::format("#ifndef {}_COMPILED_JSON_IMPL", document_name));
8383
results.impl.push_back(fmt::format("#define {}_COMPILED_JSON_IMPL", document_name));
8484

85-
results.impl.emplace_back("#include <json_compiler/constexpr_json.hpp>");
85+
results.impl.emplace_back("#include <json2cpp/constexpr_json.hpp>");
8686

8787
results.impl.push_back(fmt::format("namespace compiled_json::{} {{", document_name));
8888

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef JSON_COMPILER_HPP
2-
#define JSON_COMPILER_HPP
1+
#ifndef JSON2CPP_HPP
2+
#define JSON2CPP_HPP
33

44
#include <vector>
55
#include <string>

src/main.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55

66
#include <docopt/docopt.h>
77
#include <spdlog/spdlog.h>
8-
#include "json_compiler.hpp"
8+
#include "json2cpp.hpp"
99

1010

1111
static constexpr auto USAGE =
12-
R"(json_compiler
12+
R"(json2cpp
1313
1414
Usage:
15-
json_compiler <document_name> <file_name> <output_base_name>
16-
json_compiler (-h | --help)
17-
json_compiler --version
15+
json2cpp <document_name> <file_name> <output_base_name>
16+
json2cpp (-h | --help)
17+
json2cpp --version
1818
Options:
1919
-h --help Show this screen.
2020
--version Show version.
@@ -27,7 +27,7 @@ int main(int argc, const char **argv)
2727
std::map<std::string, docopt::value> args = docopt::docopt(USAGE,
2828
{ std::next(argv), std::next(argv, argc) },
2929
true,// show help if requested
30-
"json_compiler 0.0.1");// version string
30+
"json2cpp 0.0.1");// version string
3131

3232
std::string document_name = args.at("<document_name>").asString();
3333
std::filesystem::path filename = args.at("<file_name>").asString();

0 commit comments

Comments
 (0)