diff --git a/.gitmodules b/.gitmodules index 081a123b..97699a1c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ -[submodule "flatbuffers"] - path = third_party/flatbuffers - url = https://github.com/google/flatbuffers.git +[submodule "json"] + path = third_party/json + url = https://github.com/nlohmann/json.git [submodule "spdlog"] path = third_party/spdlog url = https://github.com/gabime/spdlog.git @@ -22,6 +22,3 @@ [submodule "optional"] path = third_party/tl_optional url = https://github.com/TartanLlama/optional.git -[submodule "json"] - path = third_party/json - url = https://github.com/nlohmann/json.git diff --git a/CMakeLists.txt b/CMakeLists.txt index ec6ce113..669219e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,8 +12,6 @@ project(BuildCC # User options option(BUILDCC_INSTALL "Enable BuildCC Installation" ON) -option(BUILDCC_FLATBUFFERS_FLATC "Build Flatbuffer::Flatc Compiler" ON) - option(BUILDCC_BUILD_AS_SINGLE_LIB "Build all internal libs and modules as part of the buildcc library" ON) option(BUILDCC_BUILD_AS_INTERFACE "Build all internal libs and modules seperately and link" OFF) @@ -34,7 +32,6 @@ option(BUILDCC_DOCUMENTATION "Enable Documentation" OFF) # Compiler options # NOTE, This option is required for clang compilers, architecture x86_64-pc-windows-msvc -# Flatbuffers library uses `std::system` internally which causes a deprecated error option(BUILDCC_NO_DEPRECATED "Disable Deprecated" OFF) if (${BUILDCC_NO_DEPRECATED}) add_compile_options("-Wno-deprecated") @@ -72,9 +69,7 @@ include(cmake/tool/cppcheck.cmake) include(cmake/tool/doxygen.cmake) # Libraries -include(cmake/target/flatbuffers.cmake) include(cmake/target/json.cmake) - include(cmake/target/fmt.cmake) include(cmake/target/spdlog.cmake) include(cmake/target/cli11.cmake) diff --git a/CMakePresets.json b/CMakePresets.json index fcc2836a..6b1d4c4b 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -17,7 +17,6 @@ "CMAKE_C_COMPILER": "gcc", "CMAKE_CXX_COMPILER": "g++", "BUILDCC_INSTALL": true, - "BUILDCC_FLATBUFFERS_FLATC": true, "BUILDCC_BUILD_AS_SINGLE_LIB": true, "BUILDCC_BUILD_AS_INTERFACE": true, "BUILDCC_BUILDEXE": true, @@ -42,7 +41,6 @@ "CMAKE_C_COMPILER": "gcc", "CMAKE_CXX_COMPILER": "g++", "BUILDCC_INSTALL": true, - "BUILDCC_FLATBUFFERS_FLATC": true, "BUILDCC_BUILD_AS_SINGLE_LIB": true, "BUILDCC_BUILD_AS_INTERFACE": false, "BUILDCC_BUILDEXE": true, @@ -67,7 +65,6 @@ "CMAKE_C_COMPILER": "gcc", "CMAKE_CXX_COMPILER": "g++", "BUILDCC_INSTALL": true, - "BUILDCC_FLATBUFFERS_FLATC": true, "BUILDCC_BUILD_AS_SINGLE_LIB": false, "BUILDCC_BUILD_AS_INTERFACE": true, "BUILDCC_BUILDEXE": false, @@ -92,7 +89,6 @@ "CMAKE_C_COMPILER": "clang", "CMAKE_CXX_COMPILER": "clang++", "BUILDCC_INSTALL": true, - "BUILDCC_FLATBUFFERS_FLATC": true, "BUILDCC_BUILD_AS_SINGLE_LIB": true, "BUILDCC_BUILD_AS_INTERFACE": true, "BUILDCC_BUILDEXE": true, @@ -114,7 +110,6 @@ "binaryDir": "${sourceDir}/_build_msvc_dev_all", "cacheVariables": { "BUILDCC_INSTALL": true, - "BUILDCC_FLATBUFFERS_FLATC": true, "BUILDCC_BUILD_AS_SINGLE_LIB": true, "BUILDCC_BUILD_AS_INTERFACE": true, "BUILDCC_BUILDEXE": true, @@ -136,7 +131,6 @@ "binaryDir": "${sourceDir}/_build_msvc_analysis", "cacheVariables": { "BUILDCC_INSTALL": false, - "BUILDCC_FLATBUFFERS_FLATC": true, "BUILDCC_BUILD_AS_SINGLE_LIB": true, "BUILDCC_BUILD_AS_INTERFACE": false, "BUILDCC_BUILDEXE": false, diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md index fe9d47bc..b19d3a63 100644 --- a/DEPENDENCIES.md +++ b/DEPENDENCIES.md @@ -2,13 +2,21 @@ These third party libraries are added as submodules since they aren't meant to be modified by this project. +### Adding a submodule + `git submodule add [git_url] third_party/[foldername]` +### Removing a submodule + +- `git rm --cached path_to_submodule` (no trailing slash) +- Delete relevant line from `.gitmodules` file +- Delete relevant section from `.git/config` file + ## Main - fmt (Formatting) - spdlog (Logging) -- flatbuffers (Serialization) +- json (Serialization) - CLI11 (Argument Parsing) - Taskflow (Parallel Programming) diff --git a/README.md b/README.md index 725ca12c..d3abdfa3 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,6 @@ Build C, C++ and ASM files in C++ - `C++17 filesystem` library support - `C++11 thread` library support - Third Party Libraries (See License below) - - Flatbuffers v2.0.0 - Nlohmann::Json v3.11.2 - Taskflow v3.1.0 - CLI11 v2.1.0 @@ -178,7 +177,6 @@ _BuildCC_ is licensed under the Apache License, Version 2.0. See [LICENSE](LICEN - [Taskflow](https://github.com/taskflow/taskflow) (Parallel Programming) [MIT License] [Header Only] - See also [3rd-Party](https://github.com/taskflow/taskflow/tree/master/3rd-party) used by Taskflow - [Nlohmann::Json](https://github.com/nlohmann/json) (JSON Serialization) [MIT License] [Header Only] -- [Flatbuffers](https://github.com/google/flatbuffers) (Serialization) [Apache-2.0 License] - [CLI11](https://github.com/CLIUtils/CLI11) (Argument Parsing) [BSD-3-Clause License] [Header Only] - [CppUTest](https://github.com/cpputest/cpputest) (Unit Testing/Mocking) [BSD-3-Clause License] - [Tl::Optional](https://github.com/TartanLlama/optional) (Optional support) [CC0-1.0 License] diff --git a/bootstrap/CMakeLists.txt b/bootstrap/CMakeLists.txt index 3c50e1b8..924fa351 100644 --- a/bootstrap/CMakeLists.txt +++ b/bootstrap/CMakeLists.txt @@ -2,7 +2,6 @@ add_executable(buildcc_lib_bootstrap main.buildcc.cpp ) target_sources(buildcc_lib_bootstrap PRIVATE - src/build_flatbuffers.cpp src/build_nlohmann_json.cpp src/build_cli11.cpp src/build_fmtlib.cpp diff --git a/bootstrap/include/bootstrap/build_buildcc.h b/bootstrap/include/bootstrap/build_buildcc.h index da4cc9f1..bef6fdf3 100644 --- a/bootstrap/include/bootstrap/build_buildcc.h +++ b/bootstrap/include/bootstrap/build_buildcc.h @@ -20,7 +20,6 @@ #include "buildcc.h" #include "build_cli11.h" -#include "build_flatbuffers.h" #include "build_fmtlib.h" #include "build_nlohmann_json.h" #include "build_spdlog.h" @@ -30,11 +29,10 @@ namespace buildcc { -void buildcc_cb(BaseTarget &target, const TargetInfo &flatbuffers_ho, - const TargetInfo &nlohmann_json_ho, const TargetInfo &fmt_ho, - const TargetInfo &spdlog_ho, const TargetInfo &cli11_ho, - const TargetInfo &taskflow_ho, const TargetInfo &tl_optional_ho, - const BaseTarget &tpl); +void buildcc_cb(BaseTarget &target, const TargetInfo &nlohmann_json_ho, + const TargetInfo &fmt_ho, const TargetInfo &spdlog_ho, + const TargetInfo &cli11_ho, const TargetInfo &taskflow_ho, + const TargetInfo &tl_optional_ho, const BaseTarget &tpl); /** * @brief @@ -43,7 +41,6 @@ void buildcc_cb(BaseTarget &target, const TargetInfo &flatbuffers_ho, class BuildBuildCC { public: // TargetInfo / Header Only - static constexpr const char *const kFlatbuffersHoName = "flatbuffers_ho"; static constexpr const char *const kNlohmannJsonHoName = "nlohmann_json_ho"; static constexpr const char *const kCli11HoName = "cli11_ho"; static constexpr const char *const kFmtHoName = "fmtlib_ho"; @@ -77,12 +74,6 @@ class BuildBuildCC { private: void Initialize(); - ExecutableTarget_generic &GetFlatc() { - return storage_.Ref(kFlatcExeName); - } - TargetInfo &GetFlatbuffersHo() { - return storage_.Ref(kFlatbuffersHoName); - } TargetInfo &GetNlohmannJsonHo() { return storage_.Ref(kNlohmannJsonHoName); } diff --git a/bootstrap/main.buildcc.cpp b/bootstrap/main.buildcc.cpp index aac2276f..4eafe255 100644 --- a/bootstrap/main.buildcc.cpp +++ b/bootstrap/main.buildcc.cpp @@ -17,7 +17,6 @@ #include "buildcc.h" #include "bootstrap/build_cli11.h" -#include "bootstrap/build_flatbuffers.h" #include "bootstrap/build_fmtlib.h" #include "bootstrap/build_spdlog.h" #include "bootstrap/build_taskflow.h" diff --git a/bootstrap/src/build_buildcc.cpp b/bootstrap/src/build_buildcc.cpp index 662e0728..38c2072c 100644 --- a/bootstrap/src/build_buildcc.cpp +++ b/bootstrap/src/build_buildcc.cpp @@ -18,11 +18,10 @@ namespace buildcc { -void buildcc_cb(BaseTarget &target, const TargetInfo &flatbuffers_ho, - const TargetInfo &nlohmann_json_ho, const TargetInfo &fmt_ho, - const TargetInfo &spdlog_ho, const TargetInfo &cli11_ho, - const TargetInfo &taskflow_ho, const TargetInfo &tl_optional_ho, - const BaseTarget &tpl) { +void buildcc_cb(BaseTarget &target, const TargetInfo &nlohmann_json_ho, + const TargetInfo &fmt_ho, const TargetInfo &spdlog_ho, + const TargetInfo &cli11_ho, const TargetInfo &taskflow_ho, + const TargetInfo &tl_optional_ho, const BaseTarget &tpl) { // NOTE, Build as single lib target.AddIncludeDir("", true); @@ -88,9 +87,6 @@ void buildcc_cb(BaseTarget &target, const TargetInfo &flatbuffers_ho, SyncOption::HeaderFiles, }; - // FLATBUFFERS HO - target.Insert(flatbuffers_ho, kInsertOptions); - // NLOHMANN JSON HO target.Insert(nlohmann_json_ho, kInsertOptions); @@ -175,17 +171,6 @@ static void global_flags_cb(TargetInfo &global_info, } void BuildBuildCC::Initialize() { - (void)storage_.Add( - kFlatcExeName, kFlatcExeName, toolchain_, - TargetEnv(env_.GetTargetRootDir() / "third_party" / "flatbuffers", - env_.GetTargetBuildDir())); - - // Flatbuffers HO lib - (void)storage_.Add( - kFlatbuffersHoName, toolchain_, - TargetEnv(env_.GetTargetRootDir() / "third_party" / "flatbuffers", - env_.GetTargetBuildDir())); - // Nlohmann json HO lib (void)storage_.Add( kNlohmannJsonHoName, toolchain_, @@ -240,7 +225,6 @@ void BuildBuildCC::Initialize() { } void BuildBuildCC::Setup(const ArgToolchainState &state) { - auto &flatbuffers_ho_lib = GetFlatbuffersHo(); auto &nlohmann_json_ho_lib = GetNlohmannJsonHo(); auto &cli11_ho_lib = GetCli11Ho(); auto &fmt_ho_lib = GetFmtHo(); @@ -250,7 +234,6 @@ void BuildBuildCC::Setup(const ArgToolchainState &state) { auto &tpl_lib = GetTpl(); auto &buildcc_lib = GetBuildcc(); Reg::Toolchain(state) - .Func(flatbuffers_ho_cb, flatbuffers_ho_lib) .Func(nlohmann_json_ho_cb, nlohmann_json_ho_lib) .Func(cli11_ho_cb, cli11_ho_lib) .Func(fmt_ho_cb, fmt_ho_lib) @@ -260,9 +243,9 @@ void BuildBuildCC::Setup(const ArgToolchainState &state) { .Func(global_flags_cb, tpl_lib, toolchain_) .Build(tpl_cb, tpl_lib) .Func(global_flags_cb, buildcc_lib, toolchain_) - .Build(buildcc_cb, buildcc_lib, flatbuffers_ho_lib, nlohmann_json_ho_lib, - fmt_ho_lib, spdlog_ho_lib, cli11_ho_lib, taskflow_ho_lib, - tl_optional_ho_lib, tpl_lib) + .Build(buildcc_cb, buildcc_lib, nlohmann_json_ho_lib, fmt_ho_lib, + spdlog_ho_lib, cli11_ho_lib, taskflow_ho_lib, tl_optional_ho_lib, + tpl_lib) .Dep(buildcc_lib, tpl_lib); } diff --git a/buildcc/CMakeLists.txt b/buildcc/CMakeLists.txt index eede4309..074288d2 100644 --- a/buildcc/CMakeLists.txt +++ b/buildcc/CMakeLists.txt @@ -13,7 +13,6 @@ if(${BUILDCC_BUILD_AS_SINGLE_LIB}) target_link_libraries(buildcc PUBLIC fmt::fmt tl::optional - flatbuffers nlohmann_json::nlohmann_json Taskflow CLI11::CLI11 @@ -29,7 +28,7 @@ if(${BUILDCC_BUILD_AS_SINGLE_LIB}) endif() endif() -# Flatbuffers schema +# Schema add_subdirectory(schema) # Environment diff --git a/buildcc/lib/target/src/generator/file_generator.cpp b/buildcc/lib/target/src/generator/file_generator.cpp index 7ec3deb2..5cdb592f 100644 --- a/buildcc/lib/target/src/generator/file_generator.cpp +++ b/buildcc/lib/target/src/generator/file_generator.cpp @@ -18,8 +18,6 @@ #include -#include "flatbuffers/flexbuffers.h" - #include "env/assert_fatal.h" namespace { @@ -32,11 +30,9 @@ class FileGeneratorBlobHandler : public buildcc::CustomBlobHandler { // serialized_data has already been verified static std::vector Deserialize(const std::vector &serialized_data) { + json j = json::from_msgpack(serialized_data, true, false); std::vector deserialized; - auto flex_vect = flexbuffers::GetRoot(serialized_data).AsVector(); - for (size_t i = 0; i < flex_vect.size(); i++) { - deserialized.emplace_back(flex_vect[i].AsString().str()); - } + j.get_to(deserialized); return deserialized; } @@ -44,17 +40,8 @@ class FileGeneratorBlobHandler : public buildcc::CustomBlobHandler { const std::vector &commands_; bool Verify(const std::vector &serialized_data) const override { - auto flex_ref = flexbuffers::GetRoot(serialized_data); - if (!flex_ref.IsVector()) { - return false; - } - auto flex_vect = flex_ref.AsVector(); - for (size_t i = 0; i < flex_vect.size(); i++) { - if (!flex_vect[i].IsString()) { - return false; - } - } - return true; + json j = json::from_msgpack(serialized_data, true, false); + return !j.is_discarded(); } bool IsEqual(const std::vector &previous, @@ -63,14 +50,8 @@ class FileGeneratorBlobHandler : public buildcc::CustomBlobHandler { } std::vector Serialize() const override { - flexbuffers::Builder builder; - builder.Vector([&]() { - for (const auto &c : commands_) { - builder.Add(c); - } - }); - builder.Finish(); - return builder.GetBuffer(); + json j = commands_; + return json::to_msgpack(j); } }; diff --git a/buildcc/lib/target/test/target/test_custom_generator.cpp b/buildcc/lib/target/test/target/test_custom_generator.cpp index fdc0ba9c..a6c6597b 100644 --- a/buildcc/lib/target/test/target/test_custom_generator.cpp +++ b/buildcc/lib/target/test/target/test_custom_generator.cpp @@ -4,8 +4,6 @@ #include "expect_custom_generator.h" #include "test_target_util.h" -#include "flatbuffers/flexbuffers.h" - #include // NOTE, Make sure all these includes are AFTER the system and header includes @@ -986,7 +984,8 @@ class MyCustomBlobHandler : public buildcc::CustomBlobHandler { private: bool Verify(const std::vector &serialized_data) const override { - return flexbuffers::GetRoot(serialized_data).IsInt(); + json j = json::from_msgpack(serialized_data); + return !j.is_discarded(); } bool IsEqual(const std::vector &previous, @@ -995,15 +994,16 @@ class MyCustomBlobHandler : public buildcc::CustomBlobHandler { } std::vector Serialize() const override { - flexbuffers::Builder builder; - builder.Add(recheck_value); - builder.Finish(); - return builder.GetBuffer(); + json j = recheck_value; + return json::to_msgpack(j); } // serialized_data has already been verified int32_t Deserialize(const std::vector &serialized_data) const { - return flexbuffers::GetRoot(serialized_data).AsInt32(); + json j = json::from_msgpack(serialized_data); + int32_t deserialized; + j.get_to(deserialized); + return deserialized; } }; diff --git a/buildcc/schema/cmake/schema.cmake b/buildcc/schema/cmake/schema.cmake index 20ba85cf..a7703233 100644 --- a/buildcc/schema/cmake/schema.cmake +++ b/buildcc/schema/cmake/schema.cmake @@ -20,7 +20,6 @@ if (${TESTING}) ) target_link_libraries(mock_schema PUBLIC mock_env - flatbuffers nlohmann_json::nlohmann_json CppUTest @@ -88,7 +87,6 @@ if(${BUILDCC_BUILD_AS_INTERFACE}) ) target_link_libraries(schema PUBLIC env - flatbuffers nlohmann_json::nlohmann_json ) target_include_directories(schema PRIVATE diff --git a/buildexe/CMakeLists.txt b/buildexe/CMakeLists.txt index 73bc7d2d..b78f1030 100644 --- a/buildexe/CMakeLists.txt +++ b/buildexe/CMakeLists.txt @@ -16,7 +16,6 @@ add_executable(buildexe target_sources(buildexe PRIVATE ../bootstrap/src/build_buildcc.cpp ../bootstrap/src/build_cli11.cpp - ../bootstrap/src/build_flatbuffers.cpp ../bootstrap/src/build_nlohmann_json.cpp ../bootstrap/src/build_fmtlib.cpp ../bootstrap/src/build_spdlog.cpp diff --git a/buildexe/buildexe.cpp b/buildexe/buildexe.cpp index 08926b0a..a93d554f 100644 --- a/buildexe/buildexe.cpp +++ b/buildexe/buildexe.cpp @@ -22,12 +22,6 @@ #include "buildexe/toolchain_setup.h" #include "bootstrap/build_buildcc.h" -#include "bootstrap/build_cli11.h" -#include "bootstrap/build_flatbuffers.h" -#include "bootstrap/build_fmtlib.h" -#include "bootstrap/build_spdlog.h" -#include "bootstrap/build_taskflow.h" -#include "bootstrap/build_tpl.h" using namespace buildcc; diff --git a/cmake/coverage/gcovr.cmake b/cmake/coverage/gcovr.cmake index 9bba8891..d127fe42 100644 --- a/cmake/coverage/gcovr.cmake +++ b/cmake/coverage/gcovr.cmake @@ -9,7 +9,6 @@ else() message("GCOVR at ${gcovr_program}") set(GCOVR_REMOVE_OPTIONS - --exclude "(.+/)?flatbuffers(.+/)?" --exclude "(.+/)?spdlog(.+/)?" --exclude "(.+/)?fmt(.+/)?" --exclude "(.+/)?taskflow(.+/)?" diff --git a/cmake/coverage/lcov.cmake b/cmake/coverage/lcov.cmake index f7551a9b..8860f459 100644 --- a/cmake/coverage/lcov.cmake +++ b/cmake/coverage/lcov.cmake @@ -21,7 +21,6 @@ else() "*/CppUTest*" "*/fmt*" "*/spdlog*" - "*/flatbuffers*" "*/taskflow*" "*/CLI11*" "*/generated*" diff --git a/cmake/target/flatbuffers.cmake b/cmake/target/flatbuffers.cmake deleted file mode 100644 index dc4e1c1b..00000000 --- a/cmake/target/flatbuffers.cmake +++ /dev/null @@ -1,13 +0,0 @@ - -# TODO, Update FLATBUFFERS option to conditionally compile FLATC - -# Set flatbuffer specific options here -set(FLATBUFFERS_BUILD_CPP17 ON CACHE BOOL "Flatbuffers C++17 support") -set(FLATBUFFERS_BUILD_TESTS OFF CACHE BOOL "Flatbuffers build tests") -set(FLATBUFFERS_BUILD_FLATC ${BUILDCC_FLATBUFFERS_FLATC} CACHE BOOL "Flatbuffers build flatc") -set(FLATBUFFERS_BUILD_FLATHASH OFF CACHE BOOL "Flatbuffers build flathash") -set(FLATBUFFERS_BUILD_FLATLIB ON CACHE BOOL "Flatbuffers build flatlib") -set(FLATBUFFERS_LIBCXX_WITH_CLANG OFF CACHE BOOL "Flatbuffers LIBCXX") -set(FLATBUFFERS_INSTALL ON CACHE BOOL "Enable the installation of targets.") -set(FLATBUFFERS_ENABLE_PCH ${BUILDCC_PRECOMPILE_HEADERS} CACHE BOOL "Flatbuffers PCH") -add_subdirectory(third_party/flatbuffers) diff --git a/doc/faq/why_this_lib.md b/doc/faq/why_this_lib.md index f14544cd..a44368fb 100644 --- a/doc/faq/why_this_lib.md +++ b/doc/faq/why_this_lib.md @@ -31,6 +31,10 @@ Also see [Target::BuildRecompile() in build.cpp](../../buildcc/lib/target/src/ta - For example: an array cannot be a root when writing your schema. - `flexbuffer` can be used to generate flexibile + efficient JSON. +# JSON + +- See https://github.com/coder137/build_in_cpp/issues/222 + # Fmtlib and Spdlog - Fmtlib and Spdlog are extremely popular libraries for formatting and logging. diff --git a/doc/software_architecture/buildcc_interface_lib.PNG b/doc/software_architecture/buildcc_interface_lib.PNG index 332d0398..58a0d56b 100644 Binary files a/doc/software_architecture/buildcc_interface_lib.PNG and b/doc/software_architecture/buildcc_interface_lib.PNG differ diff --git a/doc/software_architecture/buildcc_single_lib.PNG b/doc/software_architecture/buildcc_single_lib.PNG index 24cf51c9..767441d2 100644 Binary files a/doc/software_architecture/buildcc_single_lib.PNG and b/doc/software_architecture/buildcc_single_lib.PNG differ diff --git a/doc/user/installation_using_cmake.md b/doc/user/installation_using_cmake.md index 8789ba00..9e90bfbd 100644 --- a/doc/user/installation_using_cmake.md +++ b/doc/user/installation_using_cmake.md @@ -4,7 +4,6 @@ ## BuildCC User options - BUILDCC_INSTALL: ON -- BUILDCC_FLATBUFFERS_FLATC: ON - BUILDCC_BUILD_AS_SINGLE_LIB: ON - Generates `libbuildcc` - BUILDCC_BUILD_AS_INTERFACE_LIB: OFF diff --git a/docs/source/arch/project_layout.rst b/docs/source/arch/project_layout.rst index 8fe5298e..a62579f6 100644 --- a/docs/source/arch/project_layout.rst +++ b/docs/source/arch/project_layout.rst @@ -38,7 +38,7 @@ Project Layout * third_party ** CLI11 ** cpputest - ** flatbuffers + ** json ** fmt ** spdlog ** taskflow @@ -109,7 +109,7 @@ Global cmake variables and custom_targets * build_flags.cmake * test_flags.cmake * target - * flatbuffers.cmake + * json.cmake * fmt.cmake * spdlog.cmake * tpl.cmake @@ -144,7 +144,7 @@ example third_party ----------- -* Flatbuffers +* JSON * Fmtlib * Spdlog * CLI11 diff --git a/docs/source/arch/software_heirarchy.rst b/docs/source/arch/software_heirarchy.rst index 20877103..feb4540e 100644 --- a/docs/source/arch/software_heirarchy.rst +++ b/docs/source/arch/software_heirarchy.rst @@ -11,7 +11,7 @@ BuildCC single lib .. uml:: - rectangle Flatbuffers as flatbuffers + rectangle JSON as json rectangle fmt as fmt rectangle spdlog as spdlog rectangle Taskflow as taskflow @@ -20,7 +20,7 @@ BuildCC single lib rectangle BuildCC as buildcc - flatbuffers -up-> buildcc + json -up-> buildcc fmt -up-> buildcc spdlog -up-> buildcc taskflow -up-> buildcc @@ -39,7 +39,7 @@ BuildCC interface lib .. uml:: - rectangle Flatbuffers as flatbuffers #palegreen + rectangle JSON as json #palegreen rectangle fmt as fmt #palegreen rectangle spdlog as spdlog #palegreen rectangle Taskflow as taskflow #palegreen @@ -65,7 +65,7 @@ BuildCC interface lib cli11 -up-> args taskflow -up-> register - flatbuffers .up.> schema + json .up.> schema env -up-> schema schema -up-> toolchain diff --git a/docs/source/arch/testing.rst b/docs/source/arch/testing.rst index 58c0b5ef..31423bef 100644 --- a/docs/source/arch/testing.rst +++ b/docs/source/arch/testing.rst @@ -37,17 +37,13 @@ mock_toolchain mock_target ^^^^^^^^^^^^ -.. doxygenfunction:: GeneratorRunner +.. doxygenfunction:: CustomGeneratorRunner -.. doxygenfunction:: GeneratorExpect_InputRemoved +.. doxygenfunction:: CustomGeneratorExpect_IdRemoved -.. doxygenfunction:: GeneratorExpect_InputAdded +.. doxygenfunction:: CustomGeneratorExpect_IdAdded -.. doxygenfunction:: GeneratorExpect_InputUpdated - -.. doxygenfunction:: GeneratorExpect_OutputChanged - -.. doxygenfunction:: GeneratorExpect_CommandChanged +.. doxygenfunction:: CustomGeneratorExpect_IdUpdated From the :doc:`serialization_schema` **generator** we can see that our generator has 3 rebuild conditions diff --git a/docs/source/examples/gcc.rst b/docs/source/examples/gcc.rst index c67e3289..fb19a1a4 100644 --- a/docs/source/examples/gcc.rst +++ b/docs/source/examples/gcc.rst @@ -218,7 +218,7 @@ Use BuildCC with CMake # fmt is imported by spdlog by default find_package(fmt_package NAMES "fmt" REQUIRED) find_package(spdlog_package NAMES "spdlog" REQUIRED) - find_package(flatbuffers_package NAMES "flatbuffers" REQUIRED) + find_package(nlohmann_json_package NAMES "nlohmann_json" REQUIRED) find_package(taskflow_package NAMES "Taskflow" "taskflow" REQUIRED) find_package(CLI11_package NAMES "CLI11" REQUIRED) find_package(tiny_process_library_package NAMES "tiny-process-library" REQUIRED) @@ -227,7 +227,7 @@ Use BuildCC with CMake message("Find package: ${fmt_package_DIR}") message("Find package: ${spdlog_package_DIR}") - message("Find package: ${flatbuffers_package_DIR}") + message("Find package: ${nlohmann_json_package_DIR}") message("Find package: ${taskflow_package_DIR}") message("Find package: ${CLI11_package_DIR}") message("Find package: ${tiny_process_library_package_DIR}") # diff --git a/docs/source/getting_started/buildexe_setup.rst b/docs/source/getting_started/buildexe_setup.rst index 8d2b5918..7c554971 100644 --- a/docs/source/getting_started/buildexe_setup.rst +++ b/docs/source/getting_started/buildexe_setup.rst @@ -144,7 +144,7 @@ For example we download the **fmt library** to our libs folder **** [git cloned] *** spdlog **** [git cloned] - *** flatbuffers + *** json **** [git cloned] ** host *** gcc_x86_64-linux-gnu_9.3.0.toml diff --git a/docs/source/intro/toc.rst b/docs/source/intro/toc.rst index 3e2b01f5..46b05085 100644 --- a/docs/source/intro/toc.rst +++ b/docs/source/intro/toc.rst @@ -25,7 +25,7 @@ Pre-requisites * C++17 filesystem library support * C++11 thread library support * Third Party Libraries (See License below) - * Flatbuffers v2.0.0 + * JSON v3.11.2 * Taskflow v3.1.0 * CLI11 v2.1.0 * Tiny Process Library v2.0.4 @@ -68,6 +68,6 @@ Licenses * `Tiny Process Library `_ (Process handling) [MIT License] * `Taskflow `_ (Parallel Programming) [MIT License] [Header Only] * See also `3rd-Party `_ used by Taskflow -* `Flatbuffers `_ (Serialization) [Apache-2.0 License] [Header Only] +* `Nlohmann::Json `_ (Serialization) [MIT License] [Header Only] * `CLI11 `_ (Argument Parsing) [BSD-3-Clause License] [Header Only] * `CppUTest `_ (Unit Testing/Mocking) [BSD-3-Clause License] diff --git a/docs/source/user_api/generator.rst b/docs/source/user_api/generator.rst index 9301e6a3..364a1cf0 100644 --- a/docs/source/user_api/generator.rst +++ b/docs/source/user_api/generator.rst @@ -1,16 +1,26 @@ -Generator -========= +Template Generator +=================== -generator.h ------------ +> TODO, -.. doxygenclass:: buildcc::Generator +File Generator +=============== -.. doxygentypedef:: BaseGenerator +> TODO + +Custom Generator +================ + +custom_generator.h +------------------- + +.. doxygenclass:: buildcc::CustomGenerator Example -------- +> TODO, Update example + .. code-block:: cpp :linenos: diff --git a/docs/source/user_api/target.rst b/docs/source/user_api/target.rst index 5d3d7aa7..5d7fa001 100644 --- a/docs/source/user_api/target.rst +++ b/docs/source/user_api/target.rst @@ -36,11 +36,6 @@ sync_api.h .. doxygenclass:: buildcc::internal::SyncApi -target_getter.h ------------------ - -.. doxygenclass:: buildcc::internal::TargetInfoGetter - TargetInfo =========== diff --git a/docs/source/user_api/toolchain_utils.rst b/docs/source/user_api/toolchain_utils.rst index 6a05645f..b3161529 100644 --- a/docs/source/user_api/toolchain_utils.rst +++ b/docs/source/user_api/toolchain_utils.rst @@ -8,11 +8,6 @@ file_ext.h .. doxygenenum:: buildcc::FileExt -function_lock.h ------------------ - -.. doxygenclass:: buildcc::FunctionLock - toolchain_config.h -------------------- diff --git a/example/gcc/AfterInstall/CMakeLists.txt b/example/gcc/AfterInstall/CMakeLists.txt index 04a8cd7a..55b3aca4 100644 --- a/example/gcc/AfterInstall/CMakeLists.txt +++ b/example/gcc/AfterInstall/CMakeLists.txt @@ -12,7 +12,6 @@ project(simple) # fmt is imported by spdlog by default find_package(fmt_package NAMES "fmt" REQUIRED) find_package(spdlog_package NAMES "spdlog" REQUIRED) -find_package(flatbuffers_package NAMES "Flatbuffers" "flatbuffers" REQUIRED) find_package(nlohmann_json_package NAMES "nlohmann_json" REQUIRED) find_package(taskflow_package NAMES "Taskflow" "taskflow" REQUIRED) find_package(tl_optional_package NAMES "tl-optional" REQUIRED) @@ -23,7 +22,6 @@ find_package(buildcc_package NAMES "buildcc" REQUIRED) message("Find package: ${fmt_package_DIR}") message("Find package: ${spdlog_package_DIR}") -message("Find package: ${flatbuffers_package_DIR}") message("Find package: ${nlohmann_json_package_DIR}") message("Find package: ${tl_optional_package_DIR}") message("Find package: ${taskflow_package_DIR}") diff --git a/third_party/flatbuffers b/third_party/flatbuffers deleted file mode 160000 index a9a295fe..00000000 --- a/third_party/flatbuffers +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a9a295fecf3fbd5a4f571f53b01f63202a3e2113