Mercurial > mxe-octave
annotate src/log4cxx-test.cpp @ 5531:eae508c12529
Add build rule for build-octave (bug #49503).
* src/build-octave.mk: Add new build rule for build-octave which can be used for
cross-building binary packages that depend on Octave as a build tool.
* dist-files.mk: Add new file to list.
* index.html: Add new package to list.
* src/of-communications.mk, src/of-image.mk, src/of-mapping.mk,
src/of-optiminterp.mk, src/of-sparsersb.mk, src/of-statistics.mk,
src/of-windows.mk: Add optional dependency on build-octave.
* configure.ac: Add new configure switch "--disable-system-octave" that is
needed to build the build-octave package.
* Makefile.in: Add variable "USE_SYSTEM_OCTAVE". Exclude build-octave from the
default build tools and build it only if a package explicitly depends on it.
Display warning about missing native Octave version only if necessary.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Tue, 08 Sep 2020 23:04:38 +0200 |
parents | a7a203db74c5 |
children |
rev | line source |
---|---|
2466
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
1 /* |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
2 * This file is part of MXE. |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
3 * See index.html for further information. |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
4 */ |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
5 |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
6 #include <cstdlib> |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
7 #include "log4cxx/logger.h" |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
8 #include "log4cxx/basicconfigurator.h" |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
9 #include "log4cxx/helpers/exception.h" |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
10 |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
11 using namespace log4cxx; |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
12 using namespace log4cxx::helpers; |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
13 |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
14 LoggerPtr logger(Logger::getLogger("MXE")); |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
15 |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
16 int main(int argc, char **argv) |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
17 { |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
18 (void)argc; |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
19 (void)argv; |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
20 |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
21 int result = EXIT_SUCCESS; |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
22 try |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
23 { |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
24 BasicConfigurator::configure(); |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
25 LOG4CXX_INFO(logger, "Hello World!"); |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
26 } |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
27 catch(Exception&) |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
28 { |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
29 result = EXIT_FAILURE; |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
30 } |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
31 |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
32 return result; |
a7a203db74c5
packages apr, apr-util, log4cxx: various changes and add log4cxx test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
33 } |