Fix handling of --compile-database option (Fixes #70)
This commit is contained in:
@@ -151,7 +151,7 @@ int main(int argc, const char *argv[])
|
|||||||
CLI::App app{"Clang-based PlantUML diagram generator for C++"};
|
CLI::App app{"Clang-based PlantUML diagram generator for C++"};
|
||||||
|
|
||||||
std::string config_path{".clang-uml"};
|
std::string config_path{".clang-uml"};
|
||||||
std::string compilation_database_dir{'.'};
|
std::string compilation_database_dir{};
|
||||||
std::vector<std::string> diagram_names{};
|
std::vector<std::string> diagram_names{};
|
||||||
std::optional<std::string> output_directory;
|
std::optional<std::string> output_directory;
|
||||||
unsigned int thread_count{0};
|
unsigned int thread_count{0};
|
||||||
@@ -245,6 +245,10 @@ int main(int argc, const char *argv[])
|
|||||||
|
|
||||||
LOG_INFO("Loaded clang-uml config from {}", config_path);
|
LOG_INFO("Loaded clang-uml config from {}", config_path);
|
||||||
|
|
||||||
|
if(!compilation_database_dir.empty()) {
|
||||||
|
config.compilation_database_dir.set(compilation_database_dir);
|
||||||
|
}
|
||||||
|
|
||||||
LOG_INFO("Loading compilation database from {} directory",
|
LOG_INFO("Loading compilation database from {} directory",
|
||||||
config.compilation_database_dir());
|
config.compilation_database_dir());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user