summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Swift/QtUI/main.cpp b/Swift/QtUI/main.cpp
index bd91fd4..c5f744a 100644
--- a/Swift/QtUI/main.cpp
+++ b/Swift/QtUI/main.cpp
@@ -7,6 +7,7 @@
#include <boost/program_options/options_description.hpp>
#include <boost/program_options/variables_map.hpp>
#include <boost/program_options.hpp>
+#include <boost/version.hpp>
#include <iostream>
@@ -20,7 +21,11 @@ int main(int argc, char* argv[]) {
try {
boost::program_options::store(boost::program_options::parse_command_line(argc, argv, desc), vm);
} catch (boost::program_options::unknown_option option) {
+#if BOOST_VERSION >= 104200
std::cout << "Ignoring unknown option " << option.get_option_name() << " but continuing." << std::endl;
+#else
+ std::cout << "Error: " << option.what() << " (continuing)" << std::endl;
+#endif
}
boost::program_options::notify(vm);
if (vm.count("help") > 0) {