summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-06-02 20:16:59 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-06-02 20:21:37 (GMT)
commit23eff5bbb49f1402139065948db7b5b6535d1abd (patch)
tree2aef726ba6c29a03e5d6447f8df4fe8fd8dae426 /Swift
parentca39e52da0bf9027ab660fd31d1285b1c1d55659 (diff)
downloadswift-contrib-23eff5bbb49f1402139065948db7b5b6535d1abd.zip
swift-contrib-23eff5bbb49f1402139065948db7b5b6535d1abd.tar.bz2
Don't use unknown_program_option.get_option_name() on older Boosts.
Diffstat (limited to 'Swift')
-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) {