summaryrefslogtreecommitdiff
path: root/gnuradio-runtime
diff options
context:
space:
mode:
authorDerek Kozel <derek@bitstovolts.com>2020-06-06 00:18:49 +0100
committerMarcus Müller <marcus@hostalia.de>2020-10-29 18:41:59 +0100
commit52df5e3224d67727b43361a2292c8c8d85f55a29 (patch)
tree97123e658ba2425004463d1a6a40e8e15e1c1452 /gnuradio-runtime
parent3623a3da34ce1ee870d3f9d52582b2a082cf5f01 (diff)
utils: Added print-all to gnuradio-config-info
Signed-off-by: Derek Kozel <derek@bitstovolts.com>
Diffstat (limited to 'gnuradio-runtime')
-rw-r--r--gnuradio-runtime/apps/gnuradio-config-info.cc26
1 files changed, 16 insertions, 10 deletions
diff --git a/gnuradio-runtime/apps/gnuradio-config-info.cc b/gnuradio-runtime/apps/gnuradio-config-info.cc
index 1e73605f72..3c8778987f 100644
--- a/gnuradio-runtime/apps/gnuradio-config-info.cc
+++ b/gnuradio-runtime/apps/gnuradio-config-info.cc
@@ -29,7 +29,9 @@ int main(int argc, char** argv)
(format("Program options: %1% [options]") % argv[0]).str());
po::variables_map vm;
+ // clang-format off
desc.add_options()("help,h", "print help message")(
+ "print-all", "print all information")(
"prefix", "print GNU Radio installation prefix")(
"sysconfdir", "print GNU Radio system configuration directory")(
"prefsdir", "print GNU Radio preferences directory")(
@@ -40,6 +42,7 @@ int main(int argc, char** argv)
"cc", "print GNU Radio C compiler version")(
"cxx", "print GNU Radio C++ compiler version")(
"cflags", "print GNU Radio CFLAGS")("version,v", "print GNU Radio version");
+ // clang-format on
try {
po::store(po::parse_command_line(argc, argv, desc), vm);
@@ -56,37 +59,40 @@ int main(int argc, char** argv)
return 1;
}
- if (vm.count("prefix"))
+ bool print_all = vm.count("print-all");
+
+ if (vm.count("prefix") || print_all)
std::cout << gr::prefix() << std::endl;
- if (vm.count("sysconfdir"))
+ if (vm.count("sysconfdir") || print_all)
std::cout << gr::sysconfdir() << std::endl;
- if (vm.count("prefsdir"))
+ if (vm.count("prefsdir") || print_all)
std::cout << gr::prefsdir() << std::endl;
- if (vm.count("userprefsdir"))
+ if (vm.count("userprefsdir") || print_all)
std::cout << gr::userconf_path() << std::endl;
+ // Not included in print all due to verbosity
if (vm.count("prefs"))
std::cout << gr::prefs::singleton()->to_string() << std::endl;
- if (vm.count("builddate"))
+ if (vm.count("builddate") || print_all)
std::cout << gr::build_date() << std::endl;
- if (vm.count("enabled-components"))
+ if (vm.count("enabled-components") || print_all)
std::cout << gr::build_time_enabled_components() << std::endl;
- if (vm.count("version"))
+ if (vm.count("version") || print_all)
std::cout << gr::version() << std::endl;
- if (vm.count("cc"))
+ if (vm.count("cc") || print_all)
std::cout << gr::c_compiler() << std::endl;
- if (vm.count("cxx"))
+ if (vm.count("cxx") || print_all)
std::cout << gr::cxx_compiler() << std::endl;
- if (vm.count("cflags"))
+ if (vm.count("cflags") || print_all)
std::cout << gr::compiler_flags() << std::endl;
return 0;