diff options
Diffstat (limited to 'task_cell_graph/c++')
| -rw-r--r-- | task_cell_graph/c++/SConscript | 32 | ||||
| -rw-r--r-- | task_cell_graph/c++/dependency.hpp | 14 | ||||
| -rw-r--r-- | task_cell_graph/c++/main.cpp | 28 |
3 files changed, 74 insertions, 0 deletions
diff --git a/task_cell_graph/c++/SConscript b/task_cell_graph/c++/SConscript new file mode 100644 index 0000000..a1ac803 --- /dev/null +++ b/task_cell_graph/c++/SConscript @@ -0,0 +1,32 @@ +#!/bin/false + +import os +import os.path +import glob + + +Import('env') + +dir_path = Dir('.').abspath + +# Environment for base library +program_env = env.Clone(); + +program_env.sources = sorted(glob.glob(dir_path + "/*.cpp")) +program_env.headers = sorted(glob.glob(dir_path + "/*.hpp")) + +env.sources += program_env.sources; +env.headers += program_env.headers; + +## Static lib +objects_static = [] +program_env.add_source_files(objects_static, program_env.sources, shared=False); +env.binary = program_env.Program('#build/kel_tcg', [objects_static]); + +# Set Alias +env.Alias('binary', [env.binary]); + +env.targets += ['binary']; + +# Install +env.Install('$prefix/bin/', [env.binary]); diff --git a/task_cell_graph/c++/dependency.hpp b/task_cell_graph/c++/dependency.hpp new file mode 100644 index 0000000..5e78cb3 --- /dev/null +++ b/task_cell_graph/c++/dependency.hpp @@ -0,0 +1,14 @@ +#pragma once + +#include <forstio/codec/schema.hpp> + +namespace kel { +namespace ops { +struct Write {}; +struct Read {}; +} + +template<bool Write, bool Read> +struct operation { +}; +} diff --git a/task_cell_graph/c++/main.cpp b/task_cell_graph/c++/main.cpp new file mode 100644 index 0000000..9fa6aab --- /dev/null +++ b/task_cell_graph/c++/main.cpp @@ -0,0 +1,28 @@ +#include <forstio/error.hpp> + +#include "dependency.hpp" + +namespace kel { +saw::error_or<void> real_main(int argc, char** argv){ + + return saw::make_void(); +} +} + +int main(int argc, char** argv){ + auto eov = kel::real_main(argc, argv); + if(eov.is_error()){ + auto& err = eov.get_error(); + auto err_msg = err.get_message(); + std::cerr<<"[Error]: "<<err.get_category(); + + if(not err_msg.empty()){ + std::cerr<<" - "<<err_msg; + } + std::cerr<<std::endl; + + return err.get_id(); + } + + return 0; +} |
