Commit 713acf1c authored by GILLES Sebastien's avatar GILLES Sebastien

#1492 Remove Tclap from the library - give it the same status as the others...

#1492 Remove Tclap from the library - give it the same status as the others third party libraries that are installed through ThirdPartyCompilationFactory.
parent 32e8dff7
......@@ -48,14 +48,13 @@ include(MoReFEMSettings)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Sources /
${CMAKE_CURRENT_SOURCE_DIR}/Sources/ThirdParty/Source/Tclap/include /
${CMAKE_CURRENT_SOURCE_DIR}/Sources/ThirdParty/Source/Seldon /
${OPEN_MPI_INCL_DIR} /
${PETSC_INCL_DIR} /
${PARMETIS_INCL_DIR} /
${LUA_INCL_DIR} /
${BOOST_INCL_DIR} /
${XTENSOR_INCL_DIR} /
${TCLAP_INCL_DIR} /
${LIBMESH_INCL_DIR}
)
......
This diff is collapsed.
......@@ -100,7 +100,7 @@ install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/ DESTINATION ${MOREFEM_INSTALL_DIR_I
#
add_library(morefem_cmake INTERFACE)
target_include_directories(morefem_cmake INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:${PROJECT_NAME}/include> ${OPEN_MPI_INCL_DIR} ${PETSC_INCL_DIR} ${PARMETIS_INCL_DIR} ${LUA_INCL_DIR} ${BOOST_INCL_DIR} ${LIBMESH_INCL_DIR} ${XTENSOR_INC_DIR} $<INSTALL_INTERFACE:${PROJECT_NAME}/include/ThirdParty/Source/Tclap/include>)
target_include_directories(morefem_cmake INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:${PROJECT_NAME}/include> ${OPEN_MPI_INCL_DIR} ${PETSC_INCL_DIR} ${PARMETIS_INCL_DIR} ${LUA_INCL_DIR} ${BOOST_INCL_DIR} ${LIBMESH_INCL_DIR} ${XTENSOR_INCL_DIR} ${TCLAP_INCL_DIR} )
target_link_libraries(morefem_cmake INTERFACE ${MOREFEM_POST_PROCESSING} ${MOREFEM_TEST_TOOLS})
......
original author: Michael E. Smoot
invaluable contributions: Daniel Aarno
more contributions: Erik Zeek
more contributions: Fabien Carmagnac (Tinbergen-AM)
outstanding editing: Carol Smoot
Copyright (c) 2003 Michael E. Smoot
Copyright (c) 2004 Daniel Aarno
Copyright (c) 2017 Google Inc.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
This diff is collapsed.
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.
ACLOCAL_AMFLAGS = -I config
SUBDIRS = include examples docs tests msc config
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(PACKAGE).pc
EXTRA_DIST = $(PACKAGE).pc.in
DISTCLEANFILES = $(PACKAGE).pc
This diff is collapsed.
4/3/03 - Checked in a good sized update that move support of the library
closer to that of the POSIX/GNU standards. Switches can now be combined into
single arguments, -- is supported and MultiArgs now allow for multiple labeled
args. I've also changed things a bit by subclassing MultiArg and ValueArg
to get unlabeled versions of these classes. I think this is a bit cleaner
design, despite two new classes.
1/7/04 - ... and with great trepidation, I release 0.9.6. Loads of changes.
The big change is that you can now define the delimiter used to separate
argument flags and argument values. So if you prefer arguments of the style
"-s=asdf" instead of "-s asdf", you can do so. I've also fixed a number of
warnings generated and fixed a few pathologic bugs related to combined
switches. That said, I suspect that there may be a few significant bugs
in this release that I haven't uncovered yet. Please let me know ASAP if
you find any.
2/6/04 - Another big release: 0.9.7. First is a bugfix submitted by
Matthias Stiller that specializes the _extractValue method in a couple of
places that allows strings with spaces to be correctly read by tclap. A
second bug found by John Ling has been fixed so that exceptions are thrown
if more than one value is parsed from a single arg or if the second value
parsed is invalid. A big new feature has been added that allows args to
be xor'd. This means that two (or more) args can be specified such that
one and only one of the args is required. If a second arg is found an
exception is thrown. See the manual for details. As always, let me know
if you run into any problems.
2/10/04 - A minor release: 0.9.8. A couple of bug fixes for 0.9.7 are
included and a feature has been added that allows Args to be specified
without short options, meaning the user is forced to use only long options.
This is useful for programs with more options than map sensibly to single
chars.
7/3/04 - Added a new constructor and handling to the various value args
that allows the user to provide a list of values that the input arg values
should be restricted to.
8/9/04 - Created a function to print the output nicely, meaning line wraps
are handled somewhat sensibly now. Also changed error handling slightly.
Instead of printing the entire usage, I just print a short usage. If
someone really hates this, its easy to change back. Let me know if this
causes problems. I think this equals release 0.9.9!
10/19/04 - A number of changes that should substantially improve the library.
The most important being that we've moved the implementation of the library
entirely into the header files. This means there is no longer a library to
complile against, you simply have to #include <tclap/CmdLine.h>. New
constructors have been added to the various Arg classes that allow them to
be constructed with a CmdLine reference so that you no longer need to call
the add method if you prefer it that way. The output generated by the library
has been confined to a few methods in the CmdLine class. This means to
generate different output you can extend CmdLine and override the offending
methods. A number of style changes have been made in the code base to
conform better to C++ best practices. A thoughtful user has contributed
project files for the building the examples Microsoft Visual Studio. See
the README file in the msc directory for more details
And so we have release 1.0!
10/30/04 - A few bugfixes. Now checking for include.h before including it.
This will help Windows users who don't have it. Also changed test1 so that
it doesn't use toupper, which apparently causes problem for non-ASCII
character sets.
10/31/04 - A few more tweaks, none of which should be noticeable to people
who are already using the lib without trouble. Maybe I shouldn't release
things early in the morning! Also note that manual.html is now generated
from manual.xml. If you have your own docbook xsl style that you prefer,
then have at it.
12/3/04 - Some minor bug fixes including the removal of the two stage name
lookup ifdefs which means that the software should work out of the box
for gcc 3.4+. Isolated output in a separate class that should make
customization of output easier. I also included a rudimentary output class
that generated a (bad) Docbook command summary when used.
1/4/05 - Several bug fixes, but no new features. Fixed a bug when mandatory
long args and unlabeled args were used together and weren't working properly.
Now they can be used together. Fixed another bug in spacePrint where long
program names caused an infinite loop. Finally, fixed a small memory leak.
1/6/05 - Fixed a bug where setting the output object for a CmdLine didn't
register for version or usage generation. Doh! Created a Constraint interface
that should facilitate the creation of different constraints on Args.
This has involved changing the constructor interface, so if you've been using
allowed lists, you'll need to make a small modification to your existing code.
See examples/test6.cpp for details.
9/26/09 - Whoa, long break. Primarily a bug-fix release, but we did switch
to using traits, which necessitates the minor version bump. Take a look
at test11.cpp and test12.cpp for examples on using ArgTraits for extending
tclap for different types.
4/16/11 - Another long break! Several minor bug and memory leak fixes.
12/26/17 - v1.2 bug fix release
\ No newline at end of file
TCLAP - Templatized Command Line Argument Parser
This is a simple C++ library that facilitates parsing command line
arguments in a type independent manner. It doesn't conform exactly
to either the GNU or POSIX standards, although it is close. See
docs/manual.html for descriptions of how things work or look at the
simple examples in the examples dir.
To find out what the latest changes are read the NEWS file in this directory.
Any and all feedback is welcome to: Mike Smoot <mes@aescon.com>
This diff is collapsed.
EXTRA_DIST = ac_cxx_have_sstream.m4\
ac_cxx_have_strstream.m4\
ac_cxx_namespaces.m4\
bb_enable_doxygen.m4
This diff is collapsed.
dnl @synopsis AC_CXX_HAVE_LONG_LONG
dnl
dnl If the C++ implementation have a long long type
dnl
AC_DEFUN([AC_CXX_HAVE_LONG_LONG],
[AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([],[long long x = 1; return 0;],
ac_cv_cxx_have_long_long=yes, ac_cv_cxx_have_long_long=no)
if test "$ac_cv_cxx_have_long_long" = yes; then
AC_DEFINE(HAVE_LONG_LONG, 1,
[define if the C++ implementation have long long])
else
AC_DEFINE(HAVE_LONG_LONG, 0,
[define if the C++ implementation have long long])
fi
AC_LANG_RESTORE
])
dnl @synopsis AC_CXX_HAVE_SSTREAM
dnl
dnl If the C++ library has a working stringstream, define HAVE_SSTREAM.
dnl
dnl @author Ben Stanley
dnl @version $Id: ac_cxx_have_sstream.m4,v 1.2 2006/02/22 02:10:28 zeekec Exp $
dnl
AC_DEFUN([AC_CXX_HAVE_SSTREAM],
[AC_REQUIRE([AC_CXX_NAMESPACES])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_CHECK_HEADERS(sstream)
AC_CACHE_CHECK([whether the STL defines stringstream],
[ac_cv_cxx_have_sstream],
[AC_TRY_COMPILE([#include <sstream>
#ifdef HAVE_NAMESPACES
using namespace std;
#endif],[stringstream message; message << "Hello"; return 0;],
ac_cv_cxx_have_sstream=yes, ac_cv_cxx_have_sstream=no)
])
if test "$ac_cv_cxx_have_sstream" = yes; then
AC_DEFINE(HAVE_SSTREAM,1,[define if the compiler has stringstream])
fi
AC_LANG_RESTORE
])
dnl @synopsis AC_CXX_HAVE_STRSTREAM
dnl
dnl If the C++ library has a working strstream, define HAVE_CLASS_STRSTREAM.
dnl
dnl Adapted from ac_cxx_have_sstream.m4 by Steve Robbins
dnl
AC_DEFUN([AC_CXX_HAVE_STRSTREAM],
[AC_REQUIRE([AC_CXX_NAMESPACES])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_CHECK_HEADERS(strstream)
AC_CACHE_CHECK([whether the STL defines strstream],
[ac_cv_cxx_have_class_strstream],
[AC_TRY_COMPILE([#if HAVE_STRSTREAM
# include <strstream>
#else
# include <strstream.h>
#endif
#ifdef HAVE_NAMESPACES
using namespace std;
#endif],[ostrstream message; message << "Hello"; return 0;],
ac_cv_cxx_have_class_strstream=yes, ac_cv_cxx_have_class_strstream=no)
])
if test "$ac_cv_cxx_have_class_strstream" = yes; then
AC_DEFINE(HAVE_CLASS_STRSTREAM,1,[define if the library defines strstream])
fi
AC_LANG_RESTORE
])
dnl @synopsis AC_CXX_NAMESPACES
dnl
dnl If the compiler can prevent names clashes using namespaces, define
dnl HAVE_NAMESPACES.
dnl
dnl @version $Id: ac_cxx_namespaces.m4,v 1.1 2003/03/19 02:40:00 mes5k Exp $
dnl @author Luc Maisonobe
dnl
AC_DEFUN([AC_CXX_NAMESPACES],
[AC_CACHE_CHECK(whether the compiler implements namespaces,
ac_cv_cxx_namespaces,
[AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}],
[using namespace Outer::Inner; return i;],
ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no)
AC_LANG_RESTORE
])
if test "$ac_cv_cxx_namespaces" = yes; then
AC_DEFINE(HAVE_NAMESPACES,1,[define to 1 if the compiler implements namespaces])
fi
])
dnl HAVE_WARN_EFFECTIVE_CXX
dnl ----------------------
dnl
dnl If the C++ compiler accepts the `-Weffc++' flag,
dnl set output variable `WARN_EFFECTIVE_CXX' to `-Weffc++' and
dnl `WARN_NO_EFFECTIVE_CXX' to `-Wno-effc++'. Otherwise,
dnl leave both empty.
dnl
AC_DEFUN([HAVE_WARN_EFFECTIVE_CXX],
[
AC_REQUIRE([AC_PROG_CXX])
AC_MSG_CHECKING([whether the C++ compiler (${CXX}) accepts -Weffc++])
AC_CACHE_VAL([cv_warn_effective_cxx],
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
save_cxxflags="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -Weffc++"
AC_TRY_COMPILE([],[main();],
[cv_warn_effective_cxx=yes], [cv_warn_effective_cxx=no])
CXXFLAGS="$save_cxxflags"
AC_LANG_RESTORE
])
AC_MSG_RESULT([$cv_warn_effective_cxx])
if test "$cv_warn_effective_cxx" = yes; then
WARN_EFFECTIVE_CXX=-Weffc++
WARN_NO_EFFECTIVE_CXX=-Wno-effc++
fi
AC_SUBST([WARN_EFFECTIVE_CXX])
AC_SUBST([WARN_NO_EFFECTIVE_CXX])
])
AC_DEFUN([BB_ENABLE_DOXYGEN],
[
AC_ARG_ENABLE(doxygen, [--enable-doxygen enable documentation generation with doxygen (auto)])
if test "x$enable_doxygen" = xno; then
enable_doc=no
else
AC_PATH_PROG(DOXYGEN, doxygen, , $PATH)
if test x$DOXYGEN = x; then
if test "x$enable_doxygen" = xyes; then
AC_MSG_ERROR([could not find doxygen])
fi
enable_doc=no
else
enable_doc=yes
fi
fi
AM_CONDITIONAL(DOC, test x$enable_doc = xyes)
])
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#include <tclap/CmdLine.h>
int main() { }