mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 10:13:51 +01:00
Clean up configure options and add support for conditional building of Poco components beyond core/foundation. Tested with windows, MinGW and Linux.
This commit is contained in:
parent
0f2fa0aae6
commit
d244df7f81
@ -394,6 +394,21 @@ void FileImpl::handleLastErrorImpl(const std::string& path)
|
||||
throw CreateFileException(path);
|
||||
case ERROR_DIR_NOT_EMPTY:
|
||||
throw FileException("directory not empty", path);
|
||||
case ERROR_WRITE_FAULT:
|
||||
throw WriteFileException(path);
|
||||
case ERROR_READ_FAULT:
|
||||
throw ReadFileException(path);
|
||||
case ERROR_SHARING_VIOLATION:
|
||||
throw FileException("sharing violation", path);
|
||||
case ERROR_LOCK_VIOLATION:
|
||||
throw FileException("lock violation", path);
|
||||
case ERROR_HANDLE_EOF:
|
||||
throw ReadFileException("EOF reached", path);
|
||||
case ERROR_HANDLE_DISK_FULL:
|
||||
case ERROR_DISK_FULL:
|
||||
throw WriteFileException("disk is full", path);
|
||||
case ERROR_NEGATIVE_SEEK:
|
||||
throw FileException("negative seek", path);
|
||||
default:
|
||||
throw FileException(path);
|
||||
}
|
||||
|
12
Makefile
12
Makefile
@ -61,6 +61,7 @@ Foundation-tests: Foundation-libexec cppunit
|
||||
Foundation-samples: Foundation-libexec
|
||||
$(MAKE) -C $(POCO_BASE)/Foundation/samples
|
||||
|
||||
ifeq ($(POCO_XML_SUPPORT),enable)
|
||||
XML-libexec: Foundation-libexec
|
||||
$(MAKE) -C $(POCO_BASE)/XML
|
||||
|
||||
@ -69,7 +70,11 @@ XML-tests: XML-libexec cppunit
|
||||
|
||||
XML-samples: XML-libexec
|
||||
$(MAKE) -C $(POCO_BASE)/XML/samples
|
||||
else
|
||||
#no XML support
|
||||
endif
|
||||
|
||||
ifeq ($(POCO_UTIL_SUPPORT),enable)
|
||||
Util-libexec: Foundation-libexec XML-libexec
|
||||
$(MAKE) -C $(POCO_BASE)/Util
|
||||
|
||||
@ -78,7 +83,11 @@ Util-tests: Util-libexec cppunit
|
||||
|
||||
Util-samples: Util-libexec
|
||||
$(MAKE) -C $(POCO_BASE)/Util/samples
|
||||
else
|
||||
#no Util support
|
||||
endif
|
||||
|
||||
ifeq ($(POCO_NET_SUPPORT),enable)
|
||||
Net-libexec: Foundation-libexec
|
||||
$(MAKE) -C $(POCO_BASE)/Net
|
||||
|
||||
@ -87,6 +96,9 @@ Net-tests: Net-libexec cppunit
|
||||
|
||||
Net-samples: Net-libexec Foundation-libexec XML-libexec Util-libexec
|
||||
$(MAKE) -C $(POCO_BASE)/Net/samples
|
||||
else
|
||||
#no Net support
|
||||
endif
|
||||
|
||||
ifeq ($(POCO_NETSSL_SUPPORT),enable)
|
||||
NetSSL_OpenSSL-libexec: Foundation-libexec Net-libexec Util-libexec
|
||||
|
53
configure
vendored
53
configure
vendored
@ -53,20 +53,29 @@ Options:
|
||||
Useful if your C++ compiler has incomplete floating-point support
|
||||
(such as uclibc-based systems).
|
||||
|
||||
--disable-XML
|
||||
Disable building of Poco::XML component support
|
||||
|
||||
--disable-Util
|
||||
Disable building of Poco::Util component support
|
||||
|
||||
--disable-Net
|
||||
Disable building of Poco::Net component support
|
||||
|
||||
--disable-NetSSL
|
||||
Do not build NetSSL support
|
||||
Disable building of Poco::NetSSL component support
|
||||
|
||||
--disable-Data
|
||||
Do not build Data support
|
||||
Disable building of Poco::Data component support
|
||||
|
||||
--disable-ODBC
|
||||
Do not build Data/ODBC support
|
||||
Disable building of Poco::Data::ODBC component support
|
||||
|
||||
--disable-SQLite
|
||||
Do not build Data/SQLite support
|
||||
Disable building of Poco::Data::SQLite component support
|
||||
|
||||
--disable-MySQL
|
||||
Do not build Data/MySQL support
|
||||
Disable building of Poco::Data::MySQL component support
|
||||
|
||||
ENDHELP
|
||||
}
|
||||
@ -80,6 +89,9 @@ cd $build
|
||||
tests="tests"
|
||||
samples="samples"
|
||||
flags=""
|
||||
poco_xml_support="enable"
|
||||
poco_util_support="enable"
|
||||
poco_net_support="enable"
|
||||
poco_netssl_support="enable"
|
||||
poco_data_support="enable"
|
||||
poco_data_odbc_support="enable"
|
||||
@ -118,6 +130,18 @@ while [ "$1" != "" ] ; do
|
||||
flags="$flags -DPOCO_NO_FPENVIRONMENT"
|
||||
fi
|
||||
|
||||
if [ "$1" = "--disable-XML" ] ; then
|
||||
poco_xml_support="disable"
|
||||
fi
|
||||
|
||||
if [ "$1" = "--disable-Util" ] ; then
|
||||
poco_util_support="disable"
|
||||
fi
|
||||
|
||||
if [ "$1" = "--disable-Net" ] ; then
|
||||
poco_net_support="disable"
|
||||
fi
|
||||
|
||||
if [ "$1" = "--disable-NetSSL" ] ; then
|
||||
poco_netssl_support="disable"
|
||||
fi
|
||||
@ -128,17 +152,14 @@ while [ "$1" != "" ] ; do
|
||||
|
||||
if [ "$1" = "--disable-ODBC" ] ; then
|
||||
poco_data_odbc_support="disable"
|
||||
poco_data_support="enable"
|
||||
fi
|
||||
|
||||
if [ "$1" = "--disable-SQLite" ] ; then
|
||||
poco_data_sqlite_support="disable"
|
||||
poco_data_support="enable"
|
||||
fi
|
||||
|
||||
if [ "$1" = "--disable-MySQL" ] ; then
|
||||
poco_data_mysql_support="disable"
|
||||
poco_data_support="enable"
|
||||
fi
|
||||
|
||||
if [ "$1" = "--help" ] ; then
|
||||
@ -190,6 +211,9 @@ echo "POCO_BASE = $base" >>$build/config.make
|
||||
echo "POCO_BUILD = $build" >>$build/config.make
|
||||
echo "POCO_PREFIX = $prefix" >>$build/config.make
|
||||
echo "POCO_FLAGS = $flags" >>$build/config.make
|
||||
echo "POCO_XML_SUPPORT = $poco_xml_support" >>$build/config.make
|
||||
echo "POCO_NET_SUPPORT = $poco_net_support" >>$build/config.make
|
||||
echo "POCO_UTIL_SUPPORT = $poco_util_support" >>$build/config.make
|
||||
echo "POCO_NETSSL_SUPPORT = $poco_netssl_support" >>$build/config.make
|
||||
echo "POCO_DATA_SUPPORT = $poco_data_support" >>$build/config.make
|
||||
echo "POCO_DATA_ODBC_SUPPORT = $poco_data_odbc_support" >>$build/config.make
|
||||
@ -204,11 +228,14 @@ echo "export POCO_BASE" >>$build/config.make
|
||||
echo "export POCO_BUILD" >>$build/config.make
|
||||
echo "export POCO_PREFIX" >>$build/config.make
|
||||
echo "export POCO_FLAGS" >>$build/config.make
|
||||
echo "export POCO_NETSSL_SUPPORT = $poco_netssl_support" >>$build/config.make
|
||||
echo "export POCO_DATA_SUPPORT = $poco_data_support" >>$build/config.make
|
||||
echo "export POCO_DATA_ODBC_SUPPORT = $poco_data_odbc_support" >>$build/config.make
|
||||
echo "export POCO_DATA_SQLITE_SUPPORT = $poco_data_sqlite_support" >>$build/config.make
|
||||
echo "export POCO_DATA_MYSQL_SUPPORT = $poco_data_mysql_support" >>$build/config.make
|
||||
echo "export POCO_XML_SUPPORT" >>$build/config.make
|
||||
echo "export POCO_NET_SUPPORT" >>$build/config.make
|
||||
echo "export POCO_UTIL_SUPPORT" >>$build/config.make
|
||||
echo "export POCO_NETSSL_SUPPORT" >>$build/config.make
|
||||
echo "export POCO_DATA_SUPPORT" >>$build/config.make
|
||||
echo "export POCO_DATA_ODBC_SUPPORT" >>$build/config.make
|
||||
echo "export POCO_DATA_SQLITE_SUPPORT" >>$build/config.make
|
||||
echo "export POCO_DATA_MYSQL_SUPPORT" >>$build/config.make
|
||||
if [ "$stdcxx_base" != "" ] ; then
|
||||
echo "export STDCXX_BASE" >>$build/config.make
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user