MCPcopy Create free account
hub / github.com/OpenCppCoverage/OpenCppCoverage / FillConfigurationOptions

Function FillConfigurationOptions

CppCoverage/ProgramOptions.cpp:57–95  ·  view source on GitHub ↗

---------------------------------------------------------------------

Source from the content-addressed store, hash-verified

55
56 //---------------------------------------------------------------------
57 void
58 FillConfigurationOptions(po::options_description& options,
59 const std::vector<std::unique_ptr<IOptionParser>>& optionParsers)
60 {
61 const std::string all = "*";
62
63 options.add_options()
64 (ProgramOptions::SelectedModulesOption.c_str(),
65 po::value<T_Strings>()->default_value({ all }, all)->composing(),
66 "The pattern that module's paths should match. Can have multiple occurrences.")
67 (ProgramOptions::ExcludedModulesOption.c_str(),
68 po::value<T_Strings>()->composing(),
69 "The pattern that module's paths should NOT match. Can have multiple occurrences.")
70 (ProgramOptions::SelectedSourcesOption.c_str(),
71 po::value<T_Strings>()->default_value({ all }, all)->composing(),
72 "The pattern that source's paths should match. Can have multiple occurrences.")
73 (ProgramOptions::ExcludedSourcesOption.c_str(),
74 po::value<T_Strings>()->composing(),
75 "The pattern that source's paths should NOT match. Can have multiple occurrences.")
76 (ProgramOptions::InputCoverageValue.c_str(), po::value<T_Strings>()->composing(),
77 ("A output path of " + ExportOptionParser::ExportTypeOption + "=" + ExportOptionParser::ExportTypeBinaryValue +
78 ". This coverage data will be merged with the current one. Can have multiple occurrences.").c_str())
79 (ProgramOptions::WorkingDirectoryOption.c_str(), po::value<std::string>(), "The program working directory.")
80 (ProgramOptions::CoverChildrenOption.c_str(), "Enable code coverage for children processes.")
81 (ProgramOptions::NoAggregateByFileOption.c_str(), "Do not aggregate coverage for same file path.")
82 (ProgramOptions::StopOnAssertOption.c_str(), "Do not continue after DebugBreak() or assert().")
83 (ProgramOptions::UnifiedDiffOption.c_str(),
84 po::value<T_Strings>()->composing(), GetUnifiedDiffHelp().c_str())
85 (ProgramOptions::ContinueAfterCppExceptionOption.c_str(), "Try to continue after throwing a C++ exception.")
86 (ProgramOptions::OptimizedBuildOption.c_str(),
87 "Enable heuristics to support optimized build. See documentation for restrictions.")
88 (ProgramOptions::ExcludedLineRegexOption.c_str(), po::value<T_Strings>()->composing(),
89 "Exclude all lines match the regular expression. Regular expression must match the whole line.")
90 (ProgramOptions::SubstitutePdbSourcePathOption.c_str(), po::value<T_Strings>()->composing(),
91 "Substitute the starting path defined in the pdb by a local path.\nFormat: <pdbStartPath>?<localPath>. "
92 "Can have multiple occurrences.");
93 for (const auto& optionParser : optionParsers)
94 optionParser->AddOption(options);
95 }
96
97 //-------------------------------------------------------------------------
98 void FillHiddenOptions(po::options_description& options)

Callers 1

ProgramOptionsMethod · 0.85

Calls 2

GetUnifiedDiffHelpFunction · 0.85
AddOptionMethod · 0.80

Tested by

no test coverage detected