mirror of
https://github.com/pocoproject/poco.git
synced 2025-03-03 12:58:03 +01:00
rename some of the new Environment methods, make PocoDoc config changes backwards-compatible, revert PocoDoc config changes, make doc build scripts work on macos
This commit is contained in:
parent
f0a79015f7
commit
079c9a6263
@ -105,19 +105,15 @@ public:
|
|||||||
/// Return the operating system as defined
|
/// Return the operating system as defined
|
||||||
/// in the include Foundation/Platform.h (POCO_OS)
|
/// in the include Foundation/Platform.h (POCO_OS)
|
||||||
|
|
||||||
static Poco::Int32 cpu();
|
static Poco::Int32 arch();
|
||||||
/// Return the underlying cpu that runs this operating system
|
/// Return the underlying cpu architecture that runs this operating system
|
||||||
/// as defined in Foundation/Platform (POCO_ARCH)
|
/// as defined in Foundation/Platform (POCO_ARCH)
|
||||||
|
|
||||||
static bool osFamilyUnix();
|
static bool isUnix();
|
||||||
/// Return true if the operating system belongs to the Linux family
|
/// Return true if the operating system belongs to the Linux family
|
||||||
|
|
||||||
static bool osFamilyWindows();
|
static bool isWindows();
|
||||||
/// Return true if the operating system belongs to the Windows family
|
/// Return true if the operating system belongs to the Windows family
|
||||||
|
|
||||||
static bool osFamilyVms();
|
|
||||||
/// Return true if the operating system belongs to the VMS family
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -126,17 +126,20 @@ Poco::UInt32 Environment::libraryVersion()
|
|||||||
return POCO_VERSION;
|
return POCO_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Poco::Int32 Environment::os()
|
Poco::Int32 Environment::os()
|
||||||
{
|
{
|
||||||
return POCO_OS;
|
return POCO_OS;
|
||||||
}
|
}
|
||||||
|
|
||||||
Poco::Int32 Environment::cpu()
|
|
||||||
|
Poco::Int32 Environment::arch()
|
||||||
{
|
{
|
||||||
return POCO_ARCH;
|
return POCO_ARCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Environment::osFamilyUnix()
|
|
||||||
|
bool Environment::isUnix()
|
||||||
{
|
{
|
||||||
#if defined(POCO_OS_FAMILY_UNIX)
|
#if defined(POCO_OS_FAMILY_UNIX)
|
||||||
return true;
|
return true;
|
||||||
@ -145,7 +148,8 @@ bool Environment::osFamilyUnix()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Environment::osFamilyWindows()
|
|
||||||
|
bool Environment::isWindows()
|
||||||
{
|
{
|
||||||
#if defined(POCO_OS_FAMILY_WINDOWS)
|
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||||
return true;
|
return true;
|
||||||
@ -154,13 +158,5 @@ bool Environment::osFamilyWindows()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Environment::osFamilyVms()
|
|
||||||
{
|
|
||||||
#if defined(POCO_OS_FAMILY_VMS)
|
|
||||||
return true;
|
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Poco
|
} // namespace Poco
|
||||||
|
@ -13,13 +13,6 @@
|
|||||||
expat*.h,
|
expat*.h,
|
||||||
zconf.h,
|
zconf.h,
|
||||||
zlib.h,
|
zlib.h,
|
||||||
Alignment.h,
|
|
||||||
QName.h,
|
|
||||||
CppUnitException.h,
|
|
||||||
Constants.h,
|
|
||||||
inffast.h,
|
|
||||||
PDF/include/*.h,
|
|
||||||
CppParser/include/*.h
|
|
||||||
</exclude>
|
</exclude>
|
||||||
</files>
|
</files>
|
||||||
<pages>
|
<pages>
|
||||||
@ -35,41 +28,21 @@
|
|||||||
${PocoBuild}/*/doc/images
|
${PocoBuild}/*/doc/images
|
||||||
</resources>
|
</resources>
|
||||||
<compiler>
|
<compiler>
|
||||||
<windows>
|
<exec>clang++</exec>
|
||||||
<exec>cl.exe</exec>
|
<options>
|
||||||
<options>
|
${Includes},
|
||||||
${Includes},
|
-I/usr/local/mysql/include,
|
||||||
/I${PocoBase}/openssl/include
|
-I/usr/include/mysql,
|
||||||
/I${VC}/include,
|
-D_DEBUG,
|
||||||
/I${WDK}/shared
|
-E,
|
||||||
/I${WDK}/um
|
-C,
|
||||||
/I${WDK}/ucrt
|
-DPOCO_NO_GCC_API_ATTRIBUTE,
|
||||||
/nologo,
|
-xc++
|
||||||
/D_DEBUG,
|
-std=c++11,
|
||||||
/E,
|
-stdlib=libc++
|
||||||
/C,
|
</options>
|
||||||
/DPOCO_NO_GCC_API_ATTRIBUTE
|
<path></path>
|
||||||
/DPOCO_NO_WINDOWS_H
|
<usePipe>true</usePipe>
|
||||||
</options>
|
|
||||||
<path>${VC}/bin</path>
|
|
||||||
<usePipe>true</usePipe>
|
|
||||||
</windows>
|
|
||||||
<unix>
|
|
||||||
<exec>${CXX} ${CXXFLAGS}</exec>
|
|
||||||
<options>
|
|
||||||
${Includes},
|
|
||||||
-I/usr/local/mysql/include,
|
|
||||||
-I/usr/include/mysql,
|
|
||||||
-I/usr/include/postgresql,
|
|
||||||
-D_DEBUG,
|
|
||||||
-E,
|
|
||||||
-C,
|
|
||||||
-DPOCO_NO_GCC_API_ATTRIBUTE
|
|
||||||
-DPOCO_NO_WINDOWS_H
|
|
||||||
</options>
|
|
||||||
<path></path>
|
|
||||||
<usePipe>true</usePipe>
|
|
||||||
</unix>
|
|
||||||
</compiler>
|
</compiler>
|
||||||
<language>EN</language>
|
<language>EN</language>
|
||||||
<charset>utf-8</charset>
|
<charset>utf-8</charset>
|
||||||
|
@ -13,9 +13,7 @@
|
|||||||
expat*.h,
|
expat*.h,
|
||||||
zconf.h,
|
zconf.h,
|
||||||
zlib.h,
|
zlib.h,
|
||||||
XMLStreamParser.h,
|
${PocoBuild}/Util/include/Poco/Util/Units.h
|
||||||
CppUnitException.h,
|
|
||||||
RepeatedTest.h,
|
|
||||||
</exclude>
|
</exclude>
|
||||||
</files>
|
</files>
|
||||||
<pages>
|
<pages>
|
||||||
@ -31,23 +29,15 @@
|
|||||||
${PocoBuild}/*/doc/images
|
${PocoBuild}/*/doc/images
|
||||||
</resources>
|
</resources>
|
||||||
<compiler>
|
<compiler>
|
||||||
<exec>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe</exec>
|
<exec>g++</exec>
|
||||||
<options>
|
<options>
|
||||||
${Includes},
|
${Includes},
|
||||||
-I/usr/local/mysql/include,
|
-I/usr/local/mysql/include,
|
||||||
-I/usr/include/mysql,
|
-I/usr/include/mysql,
|
||||||
-I/usr/include/postgresql,
|
|
||||||
/I${PocoBase}/openssl/include
|
|
||||||
/IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include,
|
|
||||||
/IC:\Program Files (x86)\Windows Kits\8.1\Include\shared,
|
|
||||||
/IC:\Program Files (x86)\Windows Kits\8.1\Include\um,
|
|
||||||
/IC:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt,
|
|
||||||
/nologo,
|
|
||||||
-D_DEBUG,
|
-D_DEBUG,
|
||||||
-E,
|
-E,
|
||||||
-C,
|
-C,
|
||||||
-DPOCO_NO_GCC_API_ATTRIBUTE
|
-DPOCO_NO_GCC_API_ATTRIBUTE
|
||||||
-DPOCO_NO_WINDOWS_H
|
|
||||||
</options>
|
</options>
|
||||||
<path></path>
|
<path></path>
|
||||||
<usePipe>true</usePipe>
|
<usePipe>true</usePipe>
|
||||||
@ -104,7 +94,7 @@
|
|||||||
<loggers>
|
<loggers>
|
||||||
<root>
|
<root>
|
||||||
<channel>c1</channel>
|
<channel>c1</channel>
|
||||||
<level>information</level>
|
<level>warning</level>
|
||||||
</root>
|
</root>
|
||||||
</loggers>
|
</loggers>
|
||||||
<channels>
|
<channels>
|
||||||
|
@ -60,7 +60,6 @@ using Poco::Util::OptionCallback;
|
|||||||
using Poco::Util::HelpFormatter;
|
using Poco::Util::HelpFormatter;
|
||||||
using Poco::Util::AbstractConfiguration;
|
using Poco::Util::AbstractConfiguration;
|
||||||
|
|
||||||
static std::string osName = Environment::osName();
|
|
||||||
|
|
||||||
class Preprocessor
|
class Preprocessor
|
||||||
{
|
{
|
||||||
@ -221,14 +220,17 @@ protected:
|
|||||||
Path pp(file);
|
Path pp(file);
|
||||||
pp.setExtension("i");
|
pp.setExtension("i");
|
||||||
std::string comp = "PocoDoc.compiler";
|
std::string comp = "PocoDoc.compiler";
|
||||||
if (Environment::osFamilyWindows())
|
std::string platformComp(comp);
|
||||||
comp += ".windows";
|
|
||||||
|
if (Environment::isWindows())
|
||||||
|
platformComp += ".windows";
|
||||||
else
|
else
|
||||||
comp += ".unix";
|
platformComp += ".unix";
|
||||||
std::string exec = config().getString(comp + ".exec");
|
|
||||||
std::string opts = config().getString(comp + ".options");
|
std::string exec = config().getString(platformComp + ".exec", config().getString(comp + ".exec"));
|
||||||
std::string path = config().getString(comp + ".path", "");
|
std::string opts = config().getString(platformComp + ".options", config().getString(comp + ".options"));
|
||||||
bool usePipe = config().getBool(comp + ".usePipe", false);
|
std::string path = config().getString(platformComp + ".path", config().getString(comp + ".path", ""));
|
||||||
|
bool usePipe = config().getBool(platformComp + ".usePipe", config().getBool(comp + ".usePipe", false));
|
||||||
|
|
||||||
std::string popts;
|
std::string popts;
|
||||||
for (std::string::const_iterator it = opts.begin(); it != opts.end(); ++it)
|
for (std::string::const_iterator it = opts.begin(); it != opts.end(); ++it)
|
||||||
|
@ -18,7 +18,7 @@ Please refer to the Android NDK Dev Guide document "Standalone Toolchain", secti
|
|||||||
|
|
||||||
Typically, you'll run a command like:
|
Typically, you'll run a command like:
|
||||||
|
|
||||||
$NDK/build/tools/make-standalone-toolchain.sh --platform=android-8 --install-dir=$HOME/my-android-toolchain
|
$NDK/build/tools/make-standalone-toolchain.sh --arch arm --install-dir=$HOME/my-android-toolchain/arm
|
||||||
----
|
----
|
||||||
|
|
||||||
Then, add the directory containing the toolchain executables to your <[$PATH]>:
|
Then, add the directory containing the toolchain executables to your <[$PATH]>:
|
||||||
@ -71,18 +71,16 @@ is used to cross-build for Android from a Linux or Mac OS X host.
|
|||||||
To build the POCO C++ Libraries (static) on a Linux or Mac OS X host:
|
To build the POCO C++ Libraries (static) on a Linux or Mac OS X host:
|
||||||
|
|
||||||
./configure --config=Android --no-samples --no-tests
|
./configure --config=Android --no-samples --no-tests
|
||||||
./make -s -j4
|
make -s -j4
|
||||||
----
|
----
|
||||||
|
|
||||||
The default configuration builds for the <*armeabi*> platform ABI. To build for
|
The default configuration builds for the <*armeabi*> platform ABI. To build for
|
||||||
<*armeabi-v7a*>, set the <[ANDROID_ABI]> make variable to <[armeabi-v7a]>:
|
<*armeabi-v7a*>, set the <[ANDROID_ABI]> make variable to <[armeabi-v7a]>:
|
||||||
|
|
||||||
./make -s -j4 ANDROID_ABI=armeabi-v7a
|
make -s -j4 ANDROID_ABI=armeabi-v7a
|
||||||
----
|
----
|
||||||
|
|
||||||
The build configuration also supports setting the <[ANDROID_ABI]> to <[x86]>,
|
The build configuration also supports setting the <[ANDROID_ABI]> to <[x86]>.
|
||||||
but the NDK r6 standalone toolchain for x86 generated by <*make-standalone-toolchain.sh*>
|
|
||||||
lacks the C++ STL headers, so this does not work.
|
|
||||||
|
|
||||||
Depending on your specific requirements (e.g., no ARM architecture, etc.), it may be necessary
|
Depending on your specific requirements (e.g., no ARM architecture, etc.), it may be necessary
|
||||||
to modify the Android build configuration, or create a new one based on it.
|
to modify the Android build configuration, or create a new one based on it.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#! /bin/bash
|
#! /bin/sh
|
||||||
#
|
#
|
||||||
# mkdoc
|
# mkdoc
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user