Skip to content

Commit

Permalink
Added functionality for basic command line options.
Browse files Browse the repository at this point in the history
  • Loading branch information
rlguy committed Oct 7, 2016
1 parent 5dfb4b6 commit 6ae9e11
Show file tree
Hide file tree
Showing 17 changed files with 6,053 additions and 53 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Expand Up @@ -4,7 +4,7 @@ project(map_generation)
set(CMAKE_BUILD_TYPE Release)

if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /O2 /W4")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /O2 /W4 /D_CRT_SECURE_NO_WARNINGS")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -std=c++11 -Wall -Doff64_t=_off64_t")
endif()
Expand All @@ -23,7 +23,10 @@ else()
endif()

include_directories(src ${PYTHON_INCLUDE_DIRS})
file(GLOB SOURCES "src/*.cpp")
file(GLOB SOURCES "src/*.cpp" "src/argtable3/*.c")

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})

add_library(objects OBJECT ${SOURCES})
add_executable(map_generation $<TARGET_OBJECTS:objects>)
Expand Down
30 changes: 29 additions & 1 deletion LICENSE.md
Expand Up @@ -46,4 +46,32 @@ src/jsoncons is jsoncons, which may be obtained at https://github.com/danielapar

src/data/countrycities.json uses data from GeoNames, which may be obtained at http://download.geonames.org/export/dump/cities5000.zip
This work is licensed under a Creative Commons Attribution 3.0 License,
see http://creativecommons.org/licenses/by/3.0/
see http://creativecommons.org/licenses/by/3.0/

src/argtable3 is argtable3, which may be obtained at http://www.argtable.org/

Copyright (C) 1998-2001,2003-2011,2013 Stewart Heitmann
<sheitmann@users.sourceforge.net>
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of STEWART HEITMANN nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL STEWART HEITMANN BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 changes: 26 additions & 0 deletions src/argtable3/LICENSE
@@ -0,0 +1,26 @@
Copyright (C) 1998-2001,2003-2011,2013 Stewart Heitmann
<sheitmann@users.sourceforge.net>
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of STEWART HEITMANN nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL STEWART HEITMANN BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

118 changes: 118 additions & 0 deletions src/argtable3/README
@@ -0,0 +1,118 @@

Introduction of Argtable3
=========================

Argtable is an open source ANSI C library that parses GNU-style command-line
options. It simplifies command-line parsing by defining a declarative-style API
that you can use to specify what your command-line syntax looks like. Argtable
will automatically generate consistent error handling logic and textual
descriptions of the command line syntax, which are essential but tedious to
implement for a robust CLI program.


Quick Start of Argtable3
========================

Argtable3 is a single-file ANSI-C library. All you have to do is adding
argtable3.c to your projects, and including argtable3.h in your source code.


Documentation and Examples
==========================

To learn how to use the Argtable3 API, you can see the documentation on the web
site, or examples in the examples folder.

To build the examples, open the console window of your favorite development
environments, go to the examples folder, and use the included Makefiles to build
the examples.

If you use GCC (Linux, MinGW, Cygwin), type:

$ make

If you use Microsoft Visual C++ compiler, type:

$ nmake /f Makefile.nmake

To cleanup, type "make cleanall" or "nmake /f Makefile.nmake cleanall".


Unit Tests
==========

Argtable3 is a BSD-licensed open source library, so you can modify the library
anyway you want. However, before committing your code to your own repository or
the Argtable3 official repository, please make sure your changes can pass the
unit tests included in the distribution.

To build and run the unit tests, open the console window of your favorite
development environments, go to the tests folder, and use the included Makefiles
to build and run the unit tests.

If you use GCC (Linux, MinGW, Cygwin), type:

$ make

If you use Microsoft Visual C++ compiler, type:

$ nmake /f Makefile.nmake

To cleanup, type "make cleanall" or "nmake /f Makefile.nmake cleanall".


Authors
=======

argtable is Copyright (C) 1998-2001,2003-2011 Stewart Heitmann.
Parts are Copyright (C) 1989-1994, 1996-1999, 2001, 2003
Free Software Foundation, Inc.

argtable was written by Stewart Heitmann <sheitmann@users.sourceforge.net>

argtable is now maintained by Tom G. Huang <tomghuang@gmail.com>
The project homepage of argtable 3.x is http://www.argtable.org
The project homepage of argtable 2.x is http://argtable.sourceforge.net/

Here is a list of contributors who have helped to improve argtable:

Contributor Activities
----------- ----------
Nina Clemson Editing the original argtable-1.0 documentation.
Livio Bertacco For bug fixes and the argtable-2.x Visual C++
Makefiles.
Justin Dearing For bug fixes and Windows DLL support, plus code
support for the Open Watcom compiler and help with the
Mac OS X configuration.
Asa Packer Contributing bug fixes and upgrades to the Visual C++
Makefiles.
Danilo Cicerone For the Italian translation of "Introduction to
Argtable-2x" on http://www.digitazero.org.
Uli Fouquet For configuration patches and documentation related to
cross-compiling argtable from Unix to Windows, as well
as providing the arg_print_glossary_gnu function.
Shachar Shemesh For Debian package integration and kick-starting the
migration to automake/autoconf.
Jasper Lievisse Adriaanse Maintaining the argtable package in OpenBSD ports.
Ulrich Mohr For bug fixes relating to Texas Instrument DSP
platforms.
John Vickers For bug fixes relating to Solaris/Motorola platforms.
Steve O'Neil For bug fixes relating to Solaris/Motorola platforms.
Lori A. Pritchett-Sheats Fixing a makefile bug relating to "make dist".
Paolo Bormida For instructions on building argtable with date and
regex support on Windows.
Michel Valin For bug fixes relating to the configure scripts on IBM
AIX platforms and instructions on compiling the
example code under AIX.
Steve Christensen Providing prebuilt packages for SPARC/Solaris and
x86/Solaris platforms on www.sunfreeware.com.
Jess Portnoy Reworking the rpm package and integrating argtable
into Fedora Linux.
Michael Brown Incorporating support for pkg-config into the autoconf
scripts.
Alexander Lindert For extensions to the parser to support hex, octal and
binary integer formats as well as KB/MB/GB suffixes.
Rob Zaborowski Providing build configuration files for CMake.
Moczik Gabor For bug fixes relating to the parsing of filepaths and
filename extensions.

0 comments on commit 6ae9e11

Please sign in to comment.