mirror of
https://github.com/bkryza/clang-uml.git
synced 2025-05-18 03:32:18 +08:00
Fix handling of query_driver option in config file (#243)
This commit is contained in:
parent
c5e3b7e71d
commit
a404a3070d
@ -301,6 +301,7 @@ root:
|
|||||||
#
|
#
|
||||||
compilation_database_dir: !optional string
|
compilation_database_dir: !optional string
|
||||||
output_directory: !optional string
|
output_directory: !optional string
|
||||||
|
query_driver: !optional string
|
||||||
add_compile_flags: !optional [string]
|
add_compile_flags: !optional [string]
|
||||||
remove_compile_flags: !optional [string]
|
remove_compile_flags: !optional [string]
|
||||||
diagram_templates: !optional diagram_templates_t
|
diagram_templates: !optional diagram_templates_t
|
||||||
|
@ -815,6 +815,7 @@ template <> struct convert<config> {
|
|||||||
get_option(node, rhs.using_namespace);
|
get_option(node, rhs.using_namespace);
|
||||||
get_option(node, rhs.using_module);
|
get_option(node, rhs.using_module);
|
||||||
get_option(node, rhs.output_directory);
|
get_option(node, rhs.output_directory);
|
||||||
|
get_option(node, rhs.query_driver);
|
||||||
get_option(node, rhs.compilation_database_dir);
|
get_option(node, rhs.compilation_database_dir);
|
||||||
get_option(node, rhs.add_compile_flags);
|
get_option(node, rhs.add_compile_flags);
|
||||||
get_option(node, rhs.remove_compile_flags);
|
get_option(node, rhs.remove_compile_flags);
|
||||||
|
@ -274,6 +274,7 @@ YAML::Emitter &operator<<(YAML::Emitter &out, const config &c)
|
|||||||
|
|
||||||
out << c.compilation_database_dir;
|
out << c.compilation_database_dir;
|
||||||
out << c.output_directory;
|
out << c.output_directory;
|
||||||
|
out << c.query_driver;
|
||||||
out << c.add_compile_flags;
|
out << c.add_compile_flags;
|
||||||
out << c.remove_compile_flags;
|
out << c.remove_compile_flags;
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@ TEST_CASE("Test config simple", "[unit-test]")
|
|||||||
|
|
||||||
auto cfg = clanguml::config::load("./test_config_data/simple.yml");
|
auto cfg = clanguml::config::load("./test_config_data/simple.yml");
|
||||||
|
|
||||||
|
CHECK(cfg.query_driver() == "g++");
|
||||||
CHECK(cfg.diagrams.size() == 1);
|
CHECK(cfg.diagrams.size() == 1);
|
||||||
auto &diagram = *cfg.diagrams["class_main"];
|
auto &diagram = *cfg.diagrams["class_main"];
|
||||||
CHECK(diagram.type() == clanguml::common::model::diagram_t::kClass);
|
CHECK(diagram.type() == clanguml::common::model::diagram_t::kClass);
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
compilation_database_dir: debug
|
compilation_database_dir: debug
|
||||||
# The directory where *.puml files will be generated
|
# The directory where *.puml files will be generated
|
||||||
output_directory: docs/diagrams
|
output_directory: docs/diagrams
|
||||||
|
# Query compiler frontend for compilation flags
|
||||||
|
query_driver: .
|
||||||
# Set this as default for all diagrams
|
# Set this as default for all diagrams
|
||||||
generate_method_arguments: none
|
generate_method_arguments: none
|
||||||
# Enable generation of hyperlinks to diagram elements
|
# Enable generation of hyperlinks to diagram elements
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
compilation_database_dir: debug
|
compilation_database_dir: debug
|
||||||
comment_parser: clang
|
comment_parser: clang
|
||||||
output_directory: output
|
output_directory: output
|
||||||
|
query_driver: g++
|
||||||
generate_template_argument_dependencies: false
|
generate_template_argument_dependencies: false
|
||||||
diagrams:
|
diagrams:
|
||||||
class_main:
|
class_main:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user