diff --git a/Installation/config/support/test_BOOST_PROGRAM_OPTIONS.cpp b/Installation/config/support/test_BOOST_PROGRAM_OPTIONS.cpp index 51d797e81ee..17350ac9166 100644 --- a/Installation/config/support/test_BOOST_PROGRAM_OPTIONS.cpp +++ b/Installation/config/support/test_BOOST_PROGRAM_OPTIONS.cpp @@ -1,8 +1,5 @@ -// Copyright (c) 2006, 2007 Utrecht University (The Netherlands), -// ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany), -// INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg -// (Germany), Max-Planck-Institute Saarbruecken (Germany), RISC Linz (Austria), -// and Tel-Aviv University (Israel). All rights reserved. +// Copyright (c) 2006, 2007, 2009 Stanford University (USA), +// INRIA Sophia-Antipolis (France). All rights reserved. // // This file is part of CGAL (www.cgal.org); you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public License as @@ -17,29 +14,35 @@ // // $URL$ // $Id$ -// // -// Author(s) : Daniel Russel +// Author(s) : Daniel Russel, Sylvain Pion // Tests if BOOST_PROGRAM_OPTIONS is available. #include +#include #include +namespace po = boost::program_options; + int main(int ac, char *av[]) { std::cout << "version=" << BOOST_VERSION/100000 << "." << ((BOOST_VERSION / 100) % 100) << "." << BOOST_VERSION % 100 << std::endl; - boost::program_options::options_description desc("Allowed options"); + std::string str; + + po::options_description desc("Allowed options"); desc.add_options() ("help", "produce help message") + ("input-file,f", po::value(&str)->default_value("blabla.txt"), + "name of file") ; - boost::program_options::variables_map vm; - boost::program_options::store(boost::program_options::parse_command_line(ac, av, desc), vm); - boost::program_options::notify(vm); + po::variables_map vm; + po::store(po::parse_command_line(ac, av, desc), vm); + po::notify(vm); if (vm.count("help")) { std::cout << "Help" << "\n";