Merge pull request #1026 from zosrothko/Cygwin

Fixes for producing the poco-1.6.2 release on a Cygwin x86 platform
This commit is contained in:
Günter Obiltschnig 2016-02-28 15:29:08 +01:00
commit 3d1a094725
32 changed files with 337 additions and 165 deletions

4
.gitignore vendored
View File

@ -104,7 +104,7 @@ lib64/
pocomsg.h pocomsg.h
# Eclipse generated files # # Eclipse generated files #
###################### ###########################
.project .project
.cproject .cproject
.settings .settings
@ -113,3 +113,5 @@ cmake-build/
# Temporary files # # Temporary files #
################### ###################
*.bak *.bak
stage/
releases/

View File

@ -5,7 +5,10 @@ cache:
before_install: before_install:
# we need a recent version of CMake # we need a recent version of CMake
- sudo add-apt-repository -y ppa:andykimpe/cmake3 # linux prereqisite packages
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then wget --no-check-certificate https://www.cmake.org/files/v3.2/cmake-3.2.3-Linux-x86_64.tar.gz; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then tar -xzvf cmake-3.2.3-Linux-x86_64.tar.gz; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export PATH=$PWD/cmake-3.2.3-Linux-x86_64/bin:$PATH; fi
- sudo apt-get update -qq - sudo apt-get update -qq
- sudo apt-get install -qq -y unixodbc-dev libmysqlclient-dev g++-arm-linux-gnueabi g++-arm-linux-gnueabihf clang-3.5 sloccount cppcheck - sudo apt-get install -qq -y unixodbc-dev libmysqlclient-dev g++-arm-linux-gnueabi g++-arm-linux-gnueabihf clang-3.5 sloccount cppcheck
@ -42,14 +45,12 @@ matrix:
- env: TEST_NAME="gcc (CMake)" - env: TEST_NAME="gcc (CMake)"
compiler: gcc compiler: gcc
script: script:
- sudo apt-get install -qq -y cmake3
# disable tests, gcc-4.6 gets an internal compiler error # disable tests, gcc-4.6 gets an internal compiler error
- mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=OFF .. && make -j2 && cd .. - mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=OFF .. && make -j2 && cd ..
- env: TEST_NAME="gcc-4.8 (CMake)" - env: TEST_NAME="gcc-4.8 (CMake)"
compiler: gcc compiler: gcc
script: script:
- sudo apt-get install -qq -y cmake3
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq - sudo apt-get update -qq
- sudo apt-get install -qq -y g++-4.8 - sudo apt-get install -qq -y g++-4.8
@ -60,19 +61,16 @@ matrix:
- env: TEST_NAME="clang (CMake)" - env: TEST_NAME="clang (CMake)"
compiler: clang compiler: clang
script: script:
- sudo apt-get install -qq -y cmake3
- mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=ON .. && make -j2 && cd .. - mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=ON .. && make -j2 && cd ..
- env: TEST_NAME="arm-linux-gnueabi-g++ (CMake)" - env: TEST_NAME="arm-linux-gnueabi-g++ (CMake)"
script: script:
- sudo apt-get install -qq -y cmake3
- export CC="arm-linux-gnueabi-gcc" - export CC="arm-linux-gnueabi-gcc"
- export CXX="arm-linux-gnueabi-g++" - export CXX="arm-linux-gnueabi-g++"
- mkdir cmake-build && cd cmake-build && cmake -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_TESTS=ON .. && make -j2 && cd .. - mkdir cmake-build && cd cmake-build && cmake -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_TESTS=ON .. && make -j2 && cd ..
- env: TEST_NAME="arm-linux-gnueabihf-g++ (CMake)" - env: TEST_NAME="arm-linux-gnueabihf-g++ (CMake)"
script: script:
- sudo apt-get install -qq -y cmake3
- export CC="arm-linux-gnueabihf-gcc" - export CC="arm-linux-gnueabihf-gcc"
- export CXX="arm-linux-gnueabihf-g++" - export CXX="arm-linux-gnueabihf-g++"
- mkdir cmake-build && cd cmake-build && cmake -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_TESTS=ON .. && make -j2 && cd .. - mkdir cmake-build && cd cmake-build && cmake -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_TESTS=ON .. && make -j2 && cd ..

View File

@ -49,5 +49,6 @@ Scott Davis
Jeff Adams Jeff Adams
Martin Osborne Martin Osborne
Björn Schramke Björn Schramke
Francis Andre
-- --
$Id$ $Id$

View File

@ -23,8 +23,12 @@ endif
ifeq ($(LINKMODE),STATIC) ifeq ($(LINKMODE),STATIC)
LIBLINKEXT = .a LIBLINKEXT = .a
else else
ifeq ($(OSNAME), CYGWIN)
LIBLINKEXT = $(IMPLIBLINKEXT)
else
LIBLINKEXT = $(SHAREDLIBLINKEXT) LIBLINKEXT = $(SHAREDLIBLINKEXT)
endif endif
endif
INCLUDE += -I$(POCO_ODBC_INCLUDE) INCLUDE += -I$(POCO_ODBC_INCLUDE)
SYSLIBS += -L$(POCO_ODBC_LIB) SYSLIBS += -L$(POCO_ODBC_LIB)

View File

@ -48,6 +48,9 @@ if (POCO_UNBUNDLED)
find_package(ZLIB REQUIRED) find_package(ZLIB REQUIRED)
set(SYSLIBS ${SYSLIBS} ${ZLIB_LIBRARIES}) set(SYSLIBS ${SYSLIBS} ${ZLIB_LIBRARIES})
include_directories(${ZLIB_INCLUDE_DIRS}) include_directories(${ZLIB_INCLUDE_DIRS})
add_definitions(-DPOCO_UNBUNDLED)
else() else()
# pcre # pcre
POCO_SOURCES( SRCS pcre POCO_SOURCES( SRCS pcre

View File

@ -46,6 +46,7 @@ pcre_utf8_objects = pcre_ucd pcre_tables
ifdef POCO_UNBUNDLED ifdef POCO_UNBUNDLED
SYSLIBS += -lpcre -lz SYSLIBS += -lpcre -lz
objects += $(pcre_utf8_objects)
else else
objects += $(zlib_objects) $(pcre_objects) $(pcre_utf8_objects) objects += $(zlib_objects) $(pcre_objects) $(pcre_utf8_objects)
endif endif

View File

@ -27,17 +27,19 @@
#include <vector> #include <vector>
#if defined(POCO_UNBUNDLED)
#include <pcre.h>
#else
// //
// Copy these definitions from pcre.h // Copy these definitions from pcre.h
// to avoid pulling in the entire header file // to avoid pulling in the entire header file
// //
extern "C" extern "C"
{ {
struct real_pcre8_or_16; /* declaration; the definition is private */
typedef struct real_pcre8_or_16 pcre; typedef struct real_pcre8_or_16 pcre;
struct pcre_extra; struct pcre_extra;
} }
#endif
namespace Poco { namespace Poco {

View File

@ -4,4 +4,4 @@ set(LOCAL_SRCS "")
aux_source_directory(src LOCAL_SRCS) aux_source_directory(src LOCAL_SRCS)
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} ) add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
target_link_libraries( ${SAMPLE_NAME} PocoFoundation ) target_link_libraries( ${SAMPLE_NAME} PocoJSON PocoXML PocoFoundation)

View File

@ -12,6 +12,6 @@ objects = StringTokenizer
target = StringTokenizer target = StringTokenizer
target_version = 1 target_version = 1
target_libs = PocoFoundation target_libs = PocoJSON PocoXML PocoFoundation
include $(POCO_BASE)/build/rules/exec include $(POCO_BASE)/build/rules/exec

View File

@ -4,4 +4,4 @@ set(LOCAL_SRCS "")
aux_source_directory(src LOCAL_SRCS) aux_source_directory(src LOCAL_SRCS)
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} ) add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
target_link_libraries( ${SAMPLE_NAME} PocoFoundation ) target_link_libraries( ${SAMPLE_NAME} PocoJSON PocoXML PocoFoundation )

View File

@ -12,6 +12,6 @@ objects = URI
target = URI target = URI
target_version = 1 target_version = 1
target_libs = PocoFoundation target_libs = PocoJSON PocoXML PocoFoundation
include $(POCO_BASE)/build/rules/exec include $(POCO_BASE)/build/rules/exec

View File

@ -88,21 +88,27 @@ void FPETest::testFlags()
volatile double b = 0; volatile double b = 0;
volatile double c = div(a, b); volatile double c = div(a, b);
assert (FPE::isFlag(FPE::FP_DIVIDE_BY_ZERO)); #if !defined(POCO_NO_FPENVIRONMENT)
assert (FPE::isFlag(FPE::FP_DIVIDE_BY_ZERO));
#endif
assert (FPE::isInfinite(c)); assert (FPE::isInfinite(c));
FPE::clearFlags(); FPE::clearFlags();
a = 1.23456789e210; a = 1.23456789e210;
b = 9.87654321e210; b = 9.87654321e210;
c = mult(a, b); c = mult(a, b);
#if !defined(POCO_NO_FPENVIRONMENT)
assert (FPE::isFlag(FPE::FP_OVERFLOW)); assert (FPE::isFlag(FPE::FP_OVERFLOW));
#endif
assertEqualDelta(c, c, 0); assertEqualDelta(c, c, 0);
FPE::clearFlags(); FPE::clearFlags();
a = 1.23456789e-99; a = 1.23456789e-99;
b = 9.87654321e210; b = 9.87654321e210;
c = div(a, b); c = div(a, b);
#if !defined(POCO_NO_FPENVIRONMENT)
assert (FPE::isFlag(FPE::FP_UNDERFLOW)); assert (FPE::isFlag(FPE::FP_UNDERFLOW));
#endif
assertEqualDelta(c, c, 0); assertEqualDelta(c, c, 0);
} }
@ -118,7 +124,7 @@ void FPETest::testFlags()
void FPETest::testRound() void FPETest::testRound()
{ {
#if !defined(__osf__) && !defined(__VMS) #if !defined(__osf__) && !defined(__VMS) && !defined(POCO_NO_FPENVIRONMENT)
FPE::setRoundingMode(FPE::FP_ROUND_TONEAREST); FPE::setRoundingMode(FPE::FP_ROUND_TONEAREST);
assert (FPE::getRoundingMode() == FPE::FP_ROUND_TONEAREST); assert (FPE::getRoundingMode() == FPE::FP_ROUND_TONEAREST);
{ {

View File

@ -228,7 +228,11 @@ void FileTest::testFileAttributes2()
void FileTest::testFileAttributes3() void FileTest::testFileAttributes3()
{ {
#if defined(POCO_OS_FAMILY_UNIX) #if defined(POCO_OS_FAMILY_UNIX)
File f("/dev/console"); #if POCO_OS==POCO_OS_CYGWIN
File f("/dev/tty");
#else
File f("/dev/console");
#endif
#elif defined(POCO_OS_FAMILY_WINDOWS) && !defined(_WIN32_WCE) #elif defined(POCO_OS_FAMILY_WINDOWS) && !defined(_WIN32_WCE)
File f("CON"); File f("CON");
#endif #endif

View File

@ -9,7 +9,6 @@
// SPDX-License-Identifier: BSL-1.0 // SPDX-License-Identifier: BSL-1.0
// //
#include "SharedMemoryTest.h" #include "SharedMemoryTest.h"
#include "CppUnit/TestCaller.h" #include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h" #include "CppUnit/TestSuite.h"
@ -35,7 +34,7 @@ SharedMemoryTest::~SharedMemoryTest()
void SharedMemoryTest::testCreate() void SharedMemoryTest::testCreate()
{ {
SharedMemory mem("hi", 4096, SharedMemory::AM_WRITE); SharedMemory mem("hi", 4096, SharedMemory::AM_WRITE);
assert (mem.end()-mem.begin() == 4096); assert (mem.end()- mem.begin() == 4096);
mem.begin()[0] = 'A'; mem.begin()[0] = 'A';
mem.end()[-1] = 'Z'; mem.end()[-1] = 'Z';
} }
@ -89,8 +88,9 @@ CppUnit::Test* SharedMemoryTest::suite()
{ {
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("SharedMemoryTest"); CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("SharedMemoryTest");
#if !defined(POCO_NO_SHAREDMEMORY)
CppUnit_addTest(pSuite, SharedMemoryTest, testCreate); CppUnit_addTest(pSuite, SharedMemoryTest, testCreate);
CppUnit_addTest(pSuite, SharedMemoryTest, testCreateFromFile); CppUnit_addTest(pSuite, SharedMemoryTest, testCreateFromFile);
#endif
return pSuite; return pSuite;
} }

View File

@ -16,11 +16,13 @@
#include "Poco/TimedNotificationQueue.h" #include "Poco/TimedNotificationQueue.h"
#include "Poco/Notification.h" #include "Poco/Notification.h"
#include "Poco/Timestamp.h" #include "Poco/Timestamp.h"
#include "Poco/Clock.h"
using Poco::TimedNotificationQueue; using Poco::TimedNotificationQueue;
using Poco::Notification; using Poco::Notification;
using Poco::Timestamp; using Poco::Timestamp;
using Poco::Clock;
namespace namespace
@ -71,13 +73,13 @@ void TimedNotificationQueueTest::testDequeue()
assert (queue.size() == 0); assert (queue.size() == 0);
pNf->release(); pNf->release();
Poco::Timestamp ts1; Poco::Clock ts1;
ts1 += 100000; ts1 += 100000;
Poco::Timestamp ts2; Poco::Clock ts2;
ts2 += 200000; ts2 += 200000;
Poco::Timestamp ts3; Poco::Clock ts3;
ts3 += 300000; ts3 += 300000;
Poco::Timestamp ts4; Poco::Clock ts4;
ts4 += 400000; ts4 += 400000;
queue.enqueueNotification(new QTestNotification("first"), ts1); queue.enqueueNotification(new QTestNotification("first"), ts1);

View File

@ -11,16 +11,60 @@ ifndef POCO_BASE
$(warning WARNING: POCO_BASE is not defined. Assuming current directory.) $(warning WARNING: POCO_BASE is not defined. Assuming current directory.)
export POCO_BASE=$(shell pwd) export POCO_BASE=$(shell pwd)
endif endif
#$(info POCO_BASE = $(POCO_BASE))
ifndef POCO_PREFIX ifndef POCO_PREFIX
export POCO_PREFIX=/usr/local export POCO_PREFIX=/usr/local
endif endif
#$(info POCO_PREFIX= $(POCO_PREFIX))
ifndef POCO_BUILD ifndef POCO_BUILD
export POCO_BUILD=$(POCO_BASE) export POCO_BUILD=$(POCO_BASE)
endif endif
#$(info POCO_BUILD = $(POCO_BUILD))
LIBPREFIX ?= lib #
# Determine OS
#
POCO_HOST_OSNAME = $(shell uname)
ifeq ($(findstring CYGWIN,$(POCO_HOST_OSNAME)),CYGWIN)
POCO_HOST_OSNAME = CYGWIN
endif
ifeq ($(findstring MINGW,$(POCO_HOST_OSNAME)),MINGW)
POCO_HOST_OSNAME = MinGW
endif
POCO_HOST_OSARCH ?= $(subst /,-,$(shell uname -m | tr ' ' _))
#
# If POCO_CONFIG is not set, use the OS name as configuration name
#
ifndef POCO_CONFIG
POCO_CONFIG = $(POCO_HOST_OSNAME)
endif
#$(info POCO_CONFIG = $(POCO_CONFIG))
#
# Include System Specific Settings
#
include $(POCO_BASE)/build/config/$(POCO_CONFIG)
#
# Determine operating system
#
ifndef POCO_TARGET_OSNAME
OSNAME := $(POCO_HOST_OSNAME)
else
OSNAME := $(POCO_TARGET_OSNAME)
endif
#$(info OSNAME = $(OSNAME))
ifndef POCO_TARGET_OSARCH
OSARCH := $(POCO_HOST_OSARCH)
else
OSARCH := $(POCO_TARGET_OSARCH)
endif
#$(info OSARCH = $(OSARCH))
.PHONY: poco all libexecs cppunit tests samples cleans clean distclean install .PHONY: poco all libexecs cppunit tests samples cleans clean distclean install
@ -35,7 +79,7 @@ cppunit:
$(MAKE) -C $(POCO_BASE)/CppUnit $(MAKE) -C $(POCO_BASE)/CppUnit
CppUnit-clean: CppUnit-clean:
\$(MAKE) -C \$(POCO_BASE)/CppUnit clean $(MAKE) -C $(POCO_BASE)/CppUnit clean
install: libexecs install: libexecs
mkdir -p $(INSTALLDIR)/include/Poco mkdir -p $(INSTALLDIR)/include/Poco
@ -49,8 +93,12 @@ install: libexecs
find $(POCO_BUILD)/$$comp/bin -perm -700 -type f -exec cp -f {} $(INSTALLDIR)/bin \; ; \ find $(POCO_BUILD)/$$comp/bin -perm -700 -type f -exec cp -f {} $(INSTALLDIR)/bin \; ; \
fi ; \ fi ; \
done done
find $(POCO_BUILD)/lib -name "$(LIBPREFIX)Poco*" -type f -exec cp -f {} $(INSTALLDIR)/lib \; ifeq ($(OSNAME), CYGWIN)
find $(POCO_BUILD)/lib -name "$(LIBPREFIX)Poco*" -type l -exec cp -Rf {} $(INSTALLDIR)/lib \; find $(POCO_BUILD)/lib/$(OSNAME)/$(OSARCH) -name "cygPoco*" -type f -exec cp -f {} $(INSTALLDIR)/bin \;
find $(POCO_BUILD)/lib/$(OSNAME)/$(OSARCH) -name "cygPoco*" -type l -exec cp -Rf {} $(INSTALLDIR)/bin \;
endif
find $(POCO_BUILD)/lib/$(OSNAME)/$(OSARCH) -name "libPoco*" -type f -exec cp -f {} $(INSTALLDIR)/lib \;
find $(POCO_BUILD)/lib/$(OSNAME)/$(OSARCH) -name "libPoco*" -type l -exec cp -Rf {} $(INSTALLDIR)/lib \;
libexecs = Foundation-libexec XML-libexec JSON-libexec Util-libexec Net-libexec Crypto-libexec NetSSL_OpenSSL-libexec Data-libexec Data/SQLite-libexec Data/ODBC-libexec Data/MySQL-libexec MongoDB-libexec Zip-libexec PageCompiler-libexec PageCompiler/File2Page-libexec CppParser-libexec PDF-libexec libexecs = Foundation-libexec XML-libexec JSON-libexec Util-libexec Net-libexec Crypto-libexec NetSSL_OpenSSL-libexec Data-libexec Data/SQLite-libexec Data/ODBC-libexec Data/MySQL-libexec MongoDB-libexec Zip-libexec PageCompiler-libexec PageCompiler/File2Page-libexec CppParser-libexec PDF-libexec
tests = Foundation-tests XML-tests JSON-tests Util-tests Net-tests Crypto-tests NetSSL_OpenSSL-tests Data-tests Data/SQLite-tests Data/ODBC-tests Data/MySQL-tests MongoDB-tests Zip-tests CppParser-tests PDF-tests tests = Foundation-tests XML-tests JSON-tests Util-tests Net-tests Crypto-tests NetSSL_OpenSSL-tests Data-tests Data/SQLite-tests Data/ODBC-tests Data/MySQL-tests MongoDB-tests Zip-tests CppParser-tests PDF-tests
@ -119,7 +167,7 @@ Util-samples: Util-libexec
$(MAKE) -C $(POCO_BASE)/Util/samples $(MAKE) -C $(POCO_BASE)/Util/samples
Util-clean: Util-clean:
$(MAKE) -C $(POCO_BASE)/Util clean $(MAKE) -C $(POCO_BASE)/Util clean
$(MAKE) -C $(POCO_BASE)/Util/testsuite clean $(MAKE) -C $(POCO_BASE)/Util/testsuite clean
$(MAKE) -C $(POCO_BASE)/Util/samples clean $(MAKE) -C $(POCO_BASE)/Util/samples clean

View File

@ -12,6 +12,6 @@ objects = dict
target = dict target = dict
target_version = 1 target_version = 1
target_libs = PocoUtil PocoNet PocoXML PocoFoundation target_libs = PocoUtil PocoNet PocoJSON PocoXML PocoFoundation
include $(POCO_BASE)/build/rules/exec include $(POCO_BASE)/build/rules/exec

View File

@ -8,10 +8,15 @@
include $(POCO_BASE)/build/rules/global include $(POCO_BASE)/build/rules/global
# Where to find the PageCompiler executable # Cygwin Poco*.dll should be on PATH
PAGECOMPILER = $(POCO_BASE)/PageCompiler/bin/$(POCO_HOST_OSNAME)/$(POCO_HOST_OSARCH)/cpspc ifeq ($(OSNAME), CYGWIN)
PATH :=$(LIBPATH):$(PATH)
endif
objects = HTTPTimeServerApp TimeHandler # Where to find the PageCompiler executable
PAGECOMPILER = $(POCO_BUILD)/PageCompiler/bin/$(OSNAME)/$(OSARCH)/cpspc
objects = HTTPTimeServerApp TimeHandler
target = HTTPTimeServer target = HTTPTimeServer
target_version = 1 target_version = 1

View File

@ -0,0 +1,2 @@
/TimeHandler.h
/TimeHandler.cpp

View File

@ -1,49 +0,0 @@
//
// TimeHandler.cpp
//
// This file has been generated from TimeHandler.cpsp on 2010-01-28 08:49:54.
//
#include "TimeHandler.h"
#include "Poco/Net/HTTPServerRequest.h"
#include "Poco/Net/HTTPServerResponse.h"
#include "Poco/Net/HTMLForm.h"
#include "Poco/DateTime.h"
#include "Poco/DateTimeFormatter.h"
void TimeHandler::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Net::HTTPServerResponse& response)
{
response.setChunkedTransferEncoding(true);
response.setContentType("text/html");
Poco::Net::HTMLForm form(request, request.stream());
std::ostream& responseStream = response.send();
responseStream << "";
responseStream << "\n";
responseStream << "";
responseStream << "\n";
responseStream << "\n";
responseStream << "";
#line 6 "/ws/poco-1.3/PageCompiler/samples/HTTPTimeServer/src/TimeHandler.cpsp"
Poco::DateTime now;
std::string dt(Poco::DateTimeFormatter::format(now, "%W, %e %b %y %H:%M:%S %Z"));
responseStream << "\n";
responseStream << "<html>\n";
responseStream << "<head>\n";
responseStream << "<title>HTTPTimeServer powered by POCO C++ Libraries and PageCompiler</title>\n";
responseStream << "<meta http-equiv=\"refresh\" content=\"1\">\n";
responseStream << "</head>\n";
responseStream << "<body>\n";
responseStream << "<p style=\"text-align: center; font-size: 48px;\">";
#line 16 "/ws/poco-1.3/PageCompiler/samples/HTTPTimeServer/src/TimeHandler.cpsp"
responseStream << ( dt );
responseStream << "</p>\n";
responseStream << "</body>\n";
responseStream << "</html>\n";
responseStream << "";
}

View File

@ -1,22 +0,0 @@
//
// TimeHandler.h
//
// This file has been generated from TimeHandler.cpsp on 2010-01-28 08:49:54.
//
#ifndef TimeHandler_INCLUDED
#define TimeHandler_INCLUDED
#include "Poco/Net/HTTPRequestHandler.h"
class TimeHandler: public Poco::Net::HTTPRequestHandler
{
public:
void handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Net::HTTPServerResponse& response);
};
#endif // TimeHandler_INCLUDED

View File

@ -32,6 +32,7 @@
<options> <options>
${Includes}, ${Includes},
-I/usr/local/mysql/include, -I/usr/local/mysql/include,
-I/usr/include/mysql,
-D_DEBUG, -D_DEBUG,
-E, -E,
-C, -C,

View File

@ -33,6 +33,7 @@
<options> <options>
${Includes}, ${Includes},
-I/usr/local/mysql/include, -I/usr/local/mysql/include,
-I/usr/include/mysql,
-D_DEBUG, -D_DEBUG,
-E, -E,
-C, -C,

View File

@ -3,7 +3,7 @@
# #
# CYGWIN # CYGWIN
# #
# Make settings for Cygwin on WinXP/gcc 3.4 # Make settings for Cygwin
# #
# #
@ -20,7 +20,7 @@ CXX = g++
LINK = $(CXX) LINK = $(CXX)
LIB = ar -cr LIB = ar -cr
RANLIB = ranlib RANLIB = ranlib
SHLIB = $(CXX) -shared -o $@ -Wl,--out-implib=$(dir $@)$(subst cyg,lib,$(notdir $@)).a -Wl,--export-all-symbols -Wl,--enable-auto-import SHLIB = $(CXX) -shared -o $@
SHLIBLN = $(POCO_BASE)/build/script/shlibln SHLIBLN = $(POCO_BASE)/build/script/shlibln
STRIP = STRIP =
DEP = $(POCO_BASE)/build/script/makedepend.gcc DEP = $(POCO_BASE)/build/script/makedepend.gcc
@ -33,23 +33,30 @@ MKDIR = mkdir -p
# Extension for Shared Libraries # Extension for Shared Libraries
# #
LIBPREFIX = cyg LIBPREFIX = cyg
SHAREDLIBEXT = .$(target_version).dll SHAREDLIBEXT = -$(target_version).dll
SHAREDLIBLINKEXT = .dll SHAREDLIBLINKEXT = .dll
IMPPREFIX = lib
IMPLIBEXT = -$(target_version).dll.a
IMPLIBLINKEXT = .dll.a
# #
# Compiler and Linker Flags # Compiler and Linker Flags
# #
CFLAGS = CFLAGS =
CFLAGS32 = CFLAGS32 =
CFLAGS64 = CFLAGS64 =
CXXFLAGS = -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY CXXFLAGS = -Wa,-mbig-obj -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING
CXXFLAGS32 = CXXFLAGS32 =
CXXFLAGS64 = CXXFLAGS64 = -Wa,-mbig-obj
LINKFLAGS = SHLIBFLAGS = -Wl,--out-implib=$(dir $@)$(subst cyg,lib,$(notdir $@)).a -Wl,--export-all-symbols -Wl,--enable-auto-import
LINKFLAGS32 = SHLIBFLAGS32 =
LINKFLAGS64 = SHLIBFLAGS64 =
STATICOPT_CC = LINKFLAGS =
STATICOPT_CXX = LINKFLAGS32 =
LINKFLAGS64 =
STATICOPT_CC =
STATICOPT_CXX =
STATICOPT_LINK = -static STATICOPT_LINK = -static
SHAREDOPT_CC = SHAREDOPT_CC =
SHAREDOPT_CXX = SHAREDOPT_CXX =
@ -66,7 +73,19 @@ RELEASEOPT_LINK =
# #
SYSFLAGS = -D_XOPEN_SOURCE=500 SYSFLAGS = -D_XOPEN_SOURCE=500
# give visibility of old BSD typedef like u_short, u_int, u_long...
# used in some networking system includes, needed when using PocoNet
SYSFLAGS += -D__BSD_VISIBLE
# #
# System Specific Libraries # System Specific Libraries
# #
SYSLIBS = SYSLIBS =
# commented out until OSARCH_POSTFIX be fixed
#ifeq ($(findstring x86_64,$(shell uname -m)),x86_64)
# OSARCH_64BITS = 1
#else
# OSARCH_64BITS = 0
#endif

View File

@ -33,35 +33,35 @@ $(OBJPATH_RELEASE_STATIC) $(OBJPATH_DEBUG_STATIC) $(OBJPATH_RELEASE_SHARED) $(OB
# #
# Rules for compiling # Rules for compiling
# #
$(OBJPATH_DEBUG_STATIC)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d $(OBJPATH_DEBUG_STATIC)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(debug, static)" @echo "** Compiling" $< "(debug, static)"
$(CXX) $(INCLUDE) $(CXXFLAGS) $(DEBUGOPT_CXX) $(STATICOPT_CXX) -c $< -o $@ $(CXX) $(INCLUDE) $(CXXFLAGS) $(DEBUGOPT_CXX) $(STATICOPT_CXX) -c $< -o $@
$(OBJPATH_RELEASE_STATIC)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d $(OBJPATH_RELEASE_STATIC)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(release, static)" @echo "** Compiling" $< "(release, static)"
$(CXX) $(INCLUDE) $(CXXFLAGS) $(RELEASEOPT_CXX) $(STATICOPT_CXX) -c $< -o $@ $(CXX) $(INCLUDE) $(CXXFLAGS) $(RELEASEOPT_CXX) $(STATICOPT_CXX) -c $< -o $@
$(OBJPATH_DEBUG_STATIC)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d $(OBJPATH_DEBUG_STATIC)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(debug, static)" @echo "** Compiling" $< "(debug, static)"
$(CC) $(INCLUDE) $(CFLAGS) $(DEBUGOPT_CC) $(STATICOPT_CC) -c $< -o $@ $(CC) $(INCLUDE) $(CFLAGS) $(DEBUGOPT_CC) $(STATICOPT_CC) -c $< -o $@
$(OBJPATH_RELEASE_STATIC)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d $(OBJPATH_RELEASE_STATIC)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(release, static)" @echo "** Compiling" $< "(release, static)"
$(CC) $(INCLUDE) $(CFLAGS) $(RELEASEOPT_CC) $(STATICOPT_CC) -c $< -o $@ $(CC) $(INCLUDE) $(CFLAGS) $(RELEASEOPT_CC) $(STATICOPT_CC) -c $< -o $@
$(OBJPATH_DEBUG_SHARED)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d $(OBJPATH_DEBUG_SHARED)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(debug, shared)" @echo "** Compiling" $< "(debug, shared)"
$(CXX) $(INCLUDE) $(CXXFLAGS) $(DEBUGOPT_CXX) $(SHAREDOPT_CXX) -c $< -o $@ $(CXX) $(INCLUDE) $(CXXFLAGS) $(DEBUGOPT_CXX) $(SHAREDOPT_CXX) -c $< -o $@
$(OBJPATH_RELEASE_SHARED)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d $(OBJPATH_RELEASE_SHARED)/%.o: $(SRCDIR)/%.cpp $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(release, shared)" @echo "** Compiling" $< "(release, shared)"
$(CXX) $(INCLUDE) $(CXXFLAGS) $(RELEASEOPT_CXX) $(SHAREDOPT_CXX) -c $< -o $@ $(CXX) $(INCLUDE) $(CXXFLAGS) $(RELEASEOPT_CXX) $(SHAREDOPT_CXX) -c $< -o $@
$(OBJPATH_DEBUG_SHARED)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d $(OBJPATH_DEBUG_SHARED)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(debug, shared)" @echo "** Compiling" $< "(debug, shared)"
$(CC) $(INCLUDE) $(CFLAGS) $(DEBUGOPT_CC) $(SHAREDOPT_CC) -c $< -o $@ $(CC) $(INCLUDE) $(CFLAGS) $(DEBUGOPT_CC) $(SHAREDOPT_CC) -c $< -o $@
$(OBJPATH_RELEASE_SHARED)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d $(OBJPATH_RELEASE_SHARED)/%.o: $(SRCDIR)/%.c $(DEPPATH)/%.d $(POCO_BASE)/build/config/$(POCO_CONFIG)
@echo "** Compiling" $< "(release, shared)" @echo "** Compiling" $< "(release, shared)"
$(CC) $(INCLUDE) $(CFLAGS) $(RELEASEOPT_CC) $(SHAREDOPT_CC) -c $< -o $@ $(CC) $(INCLUDE) $(CFLAGS) $(RELEASEOPT_CC) $(SHAREDOPT_CC) -c $< -o $@

View File

@ -34,6 +34,7 @@ ifndef PROJECT_BASE
PROJECT_BASE = $(POCO_BASE) PROJECT_BASE = $(POCO_BASE)
endif endif
export PROJECT_BASE export PROJECT_BASE
$(info PROJECT_BASE = $(PROJECT_BASE))
# #
# Check for POCO_BUILD # Check for POCO_BUILD
@ -42,6 +43,7 @@ ifndef POCO_BUILD
POCO_BUILD = $(PROJECT_BASE) POCO_BUILD = $(PROJECT_BASE)
endif endif
export POCO_BUILD export POCO_BUILD
$(info POCO_BUILD = $(POCO_BUILD))
# #
# POCO_BASE/POCO_BUILD/cwd sanity checks # POCO_BASE/POCO_BUILD/cwd sanity checks
@ -74,7 +76,10 @@ endif
ifeq ($(findstring MINGW,$(POCO_HOST_OSNAME)),MINGW) ifeq ($(findstring MINGW,$(POCO_HOST_OSNAME)),MINGW)
POCO_HOST_OSNAME = MinGW POCO_HOST_OSNAME = MinGW
endif endif
$(info POCO_HOST_OSNAME= $(POCO_HOST_OSNAME))
POCO_HOST_OSARCH ?= $(subst /,-,$(shell uname -m | tr ' ' _)) POCO_HOST_OSARCH ?= $(subst /,-,$(shell uname -m | tr ' ' _))
$(info POCO_HOST_OSARCH= $(POCO_HOST_OSARCH))
# #
# Begin Sun platforms # Begin Sun platforms
@ -110,6 +115,7 @@ endif
ifndef POCO_CONFIG ifndef POCO_CONFIG
POCO_CONFIG = $(POCO_HOST_OSNAME) POCO_CONFIG = $(POCO_HOST_OSNAME)
endif endif
$(info POCO_CONFIG = $(POCO_CONFIG))
# #
# Include System Specific Settings # Include System Specific Settings
@ -124,11 +130,15 @@ OSNAME := $(POCO_HOST_OSNAME)
else else
OSNAME := $(POCO_TARGET_OSNAME) OSNAME := $(POCO_TARGET_OSNAME)
endif endif
$(info OSNAME = $(OSNAME))
ifndef POCO_TARGET_OSARCH ifndef POCO_TARGET_OSARCH
OSARCH := $(subst /,-,$(shell uname -m | tr ' ' _)) OSARCH := $(subst /,-,$(shell uname -m | tr ' ' _))
else else
OSARCH := $(POCO_TARGET_OSARCH) OSARCH := $(POCO_TARGET_OSARCH)
endif endif
$(info OSARCH = $(OSARCH))
HOSTNAME := $(shell hostname) HOSTNAME := $(shell hostname)
# #
@ -289,4 +299,3 @@ endif
# #
export CC export CC
export CXX export CXX
export LINK

View File

@ -11,8 +11,10 @@
# #
ifdef target_version ifdef target_version
SHL_EXT = $(SHAREDLIBEXT) SHL_EXT = $(SHAREDLIBEXT)
IMP_EXT = $(IMPLIBEXT)
else else
SHL_EXT = $(SHAREDLIBLINKEXT) SHL_EXT = $(SHAREDLIBLINKEXT)
IMP_EXT = $(IMPLIBLINKEXT)
endif endif
LIB_RELEASE_STATIC = $(LIBPATH)/$(LIBPREFIX)$(target)$(OSARCH_POSTFIX).a LIB_RELEASE_STATIC = $(LIBPATH)/$(LIBPREFIX)$(target)$(OSARCH_POSTFIX).a
@ -22,6 +24,13 @@ LIB_DEBUG_SHARED = $(LIBPATH)/$(LIBPREFIX)$(target)d$(OSARCH_POSTFIX)$(SH
LIB_RELEASE_SHARED_LINK = $(LIBPATH)/$(LIBPREFIX)$(target)$(OSARCH_POSTFIX)$(SHAREDLIBLINKEXT) LIB_RELEASE_SHARED_LINK = $(LIBPATH)/$(LIBPREFIX)$(target)$(OSARCH_POSTFIX)$(SHAREDLIBLINKEXT)
LIB_DEBUG_SHARED_LINK = $(LIBPATH)/$(LIBPREFIX)$(target)d$(OSARCH_POSTFIX)$(SHAREDLIBLINKEXT) LIB_DEBUG_SHARED_LINK = $(LIBPATH)/$(LIBPREFIX)$(target)d$(OSARCH_POSTFIX)$(SHAREDLIBLINKEXT)
ifeq ($(OSNAME), CYGWIN)
IMP_RELEASE_SHARED = $(LIBPATH)/$(IMPPREFIX)$(target)$(OSARCH_POSTFIX)$(IMP_EXT)
IMP_DEBUG_SHARED = $(LIBPATH)/$(IMPPREFIX)$(target)d$(OSARCH_POSTFIX)$(IMP_EXT)
IMP_RELEASE_SHARED_LINK = $(LIBPATH)/$(IMPPREFIX)$(target)$(OSARCH_POSTFIX)$(IMPLIBLINKEXT)
IMP_DEBUG_SHARED_LINK = $(LIBPATH)/$(IMPPREFIX)$(target)d$(OSARCH_POSTFIX)$(IMPLIBLINKEXT)
endif
TARGET_LIBS_DEBUG = $(foreach l,$(target_libs),-l$(l)d$(OSARCH_POSTFIX)) TARGET_LIBS_DEBUG = $(foreach l,$(target_libs),-l$(l)d$(OSARCH_POSTFIX))
TARGET_LIBS_RELEASE = $(foreach l,$(target_libs),-l$(l)$(OSARCH_POSTFIX)) TARGET_LIBS_RELEASE = $(foreach l,$(target_libs),-l$(l)$(OSARCH_POSTFIX))
@ -62,12 +71,18 @@ $(LIB_RELEASE_STATIC): $(foreach o,$(objects),$(OBJPATH_RELEASE_STATIC)/$(o).o)
$(LIB_DEBUG_SHARED): $(foreach o,$(objects),$(OBJPATH_DEBUG_SHARED)/$(o).o) $(LIB_DEBUG_SHARED): $(foreach o,$(objects),$(OBJPATH_DEBUG_SHARED)/$(o).o)
@echo "** Building shared library (debug)" $@ @echo "** Building shared library (debug)" $@
$(SHLIB) $(SHLIBFLAGS) $^ $(LIBRARY) $(TARGET_LIBS_DEBUG) $(SYSLIBS) $(SHLIB) $(SHLIBFLAGS) $^ $(LIBRARY) $(TARGET_LIBS_DEBUG) $(SYSLIBS)
ifeq ($(OSNAME), CYGWIN)
$(SHLIBLN) $(IMP_DEBUG_SHARED) $(IMP_DEBUG_SHARED_LINK)
endif
$(SHLIBLN) $(LIB_DEBUG_SHARED) $(LIB_DEBUG_SHARED_LINK) $(SHLIBLN) $(LIB_DEBUG_SHARED) $(LIB_DEBUG_SHARED_LINK)
$(postbuild) $(postbuild)
$(LIB_RELEASE_SHARED): $(foreach o,$(objects),$(OBJPATH_RELEASE_SHARED)/$(o).o) $(LIB_RELEASE_SHARED): $(foreach o,$(objects),$(OBJPATH_RELEASE_SHARED)/$(o).o)
@echo "** Building shared library (release)" $@ @echo "** Building shared library (release)" $@
$(SHLIB) $(SHLIBFLAGS) $^ $(LIBRARY) $(TARGET_LIBS_RELEASE) $(SYSLIBS) $(SHLIB) $(SHLIBFLAGS) $^ $(LIBRARY) $(TARGET_LIBS_RELEASE) $(SYSLIBS)
ifeq ($(OSNAME), CYGWIN)
$(SHLIBLN) $(IMP_RELEASE_SHARED) $(IMP_RELEASE_SHARED_LINK)
endif
$(SHLIBLN) $(LIB_RELEASE_SHARED) $(LIB_RELEASE_SHARED_LINK) $(SHLIBLN) $(LIB_RELEASE_SHARED) $(LIB_RELEASE_SHARED_LINK)
$(STRIPCMD) $(STRIPCMD)
$(postbuild) $(postbuild)

View File

@ -4,24 +4,63 @@
# #
# A script for running the POCO testsuites. # A script for running the POCO testsuites.
# #
# usage: runtests # usage: runtests [component [test] ]
# #
# If the environment variable EXCLUDE_TESTS is set, containing # If the environment variable EXCLUDE_TESTS is set, containing
# a space-separated list of project names (as found in the # a space-separated list of project names (as found in the
# components file), these tests will be skipped. # components file), these tests will be skipped.
# #
# Cygwin specific setup.
# ----------------------
# On Cygwin, Unix IPC are provided by a separate process daemon
# named cygserver, which should be started once before running any
# test from Foundation.
# 1/ Open a separate Cygwin terminal with Administrator privilege
# 2/ run the command: cygserver-configure
# 3/ Start the cygserver: nohup /usr/sbin/cygserver &
# 4/ close the separate terminal
# 5/ run the Foundation tests: build/script/runtests.sh Foundation
#
if [ "$POCO_BASE" = "" ] ; then
POCO_BASE=`pwd`
fi
if [ "$POCO_BUILD" = "" ] ; then
POCO_BUILD=$POCO_BASE
fi
TESTRUNNER=./testrunner TESTRUNNER=./testrunner
TESTRUNNERARGS=-all
components=`cat $POCO_BASE/components` if [ "$1" = "" ] ; then
components=`cat $POCO_BASE/components`
if [ "$OSNAME" = "" ] ; then else
OSNAME=`uname` components=$1
fi fi
if [ "$2" = "" ] ; then
TESTRUNNERARGS=-all
else
TESTRUNNERARGS=$2
fi
if [ "$OSARCH" = "" ] ; then if [ "$OSARCH" = "" ] ; then
OSARCH=`uname -m | tr ' /' _-` OSARCH=`uname -m | tr ' /' _-`
fi fi
if [ "$OSNAME" = "" ] ; then
OSNAME=`uname`
case $OSNAME in
CYGWIN*)
OSNAME=CYGWIN
TESTRUNNER=$TESTRUNNER.exe
PATH=$POCO_BUILD/lib/$OSNAME/$OSARCH:$PATH
;;
MINGW*)
OSNAME=MinGW ;;
esac
fi
BINDIR="bin/$OSNAME/$OSARCH/" BINDIR="bin/$OSNAME/$OSARCH/"
runs=0 runs=0
@ -39,19 +78,19 @@ do
fi fi
done done
if [ $excluded -eq 0 ] ; then if [ $excluded -eq 0 ] ; then
if [ -d "$POCO_BASE/$comp/testsuite/$BINDIR" ] ; then if [ -d "$POCO_BUILD/$comp/testsuite/$BINDIR" ] ; then
if [ -x "$POCO_BASE/$comp/testsuite/$BINDIR/$TESTRUNNER" ] ; then if [ -x "$POCO_BUILD/$comp/testsuite/$BINDIR/$TESTRUNNER" ] ; then
echo "" echo ""
echo "" echo ""
echo "****************************************" echo "****************************************"
echo "*** $comp" echo "*** $OSNAME $OSARCH $comp"
echo "****************************************" echo "****************************************"
echo "" echo ""
runs=`expr $runs + 1` runs=`expr $runs + 1`
sh -c "cd $POCO_BASE/$comp/testsuite/$BINDIR && $TESTRUNNER $TESTRUNNERARGS" sh -c "cd $POCO_BUILD/$comp/testsuite/$BINDIR && LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH $TESTRUNNER $TESTRUNNERARGS"
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
failues=`expr $failures + 1` failures=`expr $failures + 1`
failedTests="$failedTests $comp" failedTests="$failedTests $comp"
status=1 status=1
fi fi

View File

@ -48,19 +48,23 @@ if(MSVC)
else(MSVC) else(MSVC)
# Other compilers then MSVC don't have a static STATIC_POSTFIX at the moment # Other compilers then MSVC don't have a static STATIC_POSTFIX at the moment
set(STATIC_POSTFIX "" CACHE STRING "Set static library postfix" FORCE) set(STATIC_POSTFIX "" CACHE STRING "Set static library postfix" FORCE)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
endif(MSVC) endif(MSVC)
# Add a d postfix to the debug libraries # Add a d postfix to the debug libraries
if(POCO_STATIC) if(POCO_STATIC)
set(CMAKE_DEBUG_POSTFIX "${STATIC_POSTFIX}d" CACHE STRING "Set Debug library postfix" FORCE) set(CMAKE_DEBUG_POSTFIX "${STATIC_POSTFIX}d" CACHE STRING "Set Debug library postfix" FORCE)
set(CMAKE_RELEASE_POSTFIX "${STATIC_POSTFIX}" CACHE STRING "Set Release library postfix" FORCE) set(CMAKE_RELEASE_POSTFIX "${STATIC_POSTFIX}" CACHE STRING "Set Release library postfix" FORCE)
set(CMAKE_MINSIZEREL_POSTFIX "${STATIC_POSTFIX}" CACHE STRING "Set MinSizeRel library postfix" FORCE) set(CMAKE_MINSIZEREL_POSTFIX "${STATIC_POSTFIX}" CACHE STRING "Set MinSizeRel library postfix" FORCE)
set(CMAKE_RELWITHDEBINFO_POSTFIX "${STATIC_POSTFIX}d" CACHE STRING "Set RelWithDebInfo library postfix" FORCE) set(CMAKE_RELWITHDEBINFO_POSTFIX "${STATIC_POSTFIX}" CACHE STRING "Set RelWithDebInfo library postfix" FORCE)
else(POCO_STATIC) else(POCO_STATIC)
set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Set Debug library postfix" FORCE) set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Set Debug library postfix" FORCE)
set(CMAKE_RELEASE_POSTFIX "" CACHE STRING "Set Release library postfix" FORCE) set(CMAKE_RELEASE_POSTFIX "" CACHE STRING "Set Release library postfix" FORCE)
set(CMAKE_MINSIZEREL_POSTFIX "" CACHE STRING "Set MinSizeRel library postfix" FORCE) set(CMAKE_MINSIZEREL_POSTFIX "" CACHE STRING "Set MinSizeRel library postfix" FORCE)
set(CMAKE_RELWITHDEBINFO_POSTFIX "d" CACHE STRING "Set RelWithDebInfo library postfix" FORCE) set(CMAKE_RELWITHDEBINFO_POSTFIX "" CACHE STRING "Set RelWithDebInfo library postfix" FORCE)
endif() endif()
@ -72,23 +76,28 @@ if(WIN32)
add_definitions( -DPOCO_OS_FAMILY_WINDOWS -DUNICODE -D_UNICODE -D__LCC__) #__LCC__ define used by MySQL.h add_definitions( -DPOCO_OS_FAMILY_WINDOWS -DUNICODE -D_UNICODE -D__LCC__) #__LCC__ define used by MySQL.h
endif(WIN32) endif(WIN32)
if (UNIX AND NOT ANDROID ) if (CYGWIN)
add_definitions( -DPOCO_OS_FAMILY_UNIX ) add_definitions(-DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING)
# Standard 'must be' defines add_definitions(-D_XOPEN_SOURCE=500 -D__BSD_VISIBLE)
if (APPLE) else (CYGWIN)
add_definitions( -DPOCO_HAVE_IPv6 -DPOCO_NO_STAT64) if (UNIX AND NOT ANDROID )
set(SYSLIBS dl) add_definitions( -DPOCO_OS_FAMILY_UNIX )
else (APPLE) # Standard 'must be' defines
add_definitions( -D_REENTRANT -D_THREAD_SAFE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 ) if (APPLE)
if (QNX) add_definitions( -DPOCO_HAVE_IPv6 -DPOCO_NO_STAT64)
add_definitions( -DPOCO_HAVE_FD_POLL) set(SYSLIBS dl)
set(SYSLIBS m socket) else (APPLE)
else (QNX) add_definitions( -D_REENTRANT -D_THREAD_SAFE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 )
add_definitions( -D_XOPEN_SOURCE=500 -DPOCO_HAVE_FD_EPOLL) if (QNX)
set(SYSLIBS pthread dl rt) add_definitions( -DPOCO_HAVE_FD_POLL)
endif (QNX) set(SYSLIBS m socket)
endif (APPLE) else (QNX)
endif(UNIX AND NOT ANDROID ) add_definitions( -D_XOPEN_SOURCE=500 -DPOCO_HAVE_FD_EPOLL)
set(SYSLIBS pthread dl rt)
endif (QNX)
endif (APPLE)
endif(UNIX AND NOT ANDROID )
endif (CYGWIN)
if (CMAKE_SYSTEM MATCHES "SunOS") if (CMAKE_SYSTEM MATCHES "SunOS")
add_definitions( -DPOCO_OS_FAMILY_UNIX ) add_definitions( -DPOCO_OS_FAMILY_UNIX )
@ -102,10 +111,6 @@ if (CMAKE_COMPILER_IS_MINGW)
add_definitions(-D_WIN32 -DMINGW32 -DWINVER=0x500 -DODBCVER=0x0300 -DPOCO_THREAD_STACK_SIZE) add_definitions(-D_WIN32 -DMINGW32 -DWINVER=0x500 -DODBCVER=0x0300 -DPOCO_THREAD_STACK_SIZE)
endif (CMAKE_COMPILER_IS_MINGW) endif (CMAKE_COMPILER_IS_MINGW)
if (CYGWIN)
# add_definitions(-DWC_NO_BEST_FIT_CHARS=0x400 -DPOCO_WIN32_UTF8)
endif (CYGWIN)
# SunPro C++ # SunPro C++
if (${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro") if (${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
add_definitions( -D_BSD_SOURCE -library=stlport4) add_definitions( -D_BSD_SOURCE -library=stlport4)

View File

@ -14,6 +14,13 @@
# usage: mkdoc [-l <perforce-label>] [<specfile>] # usage: mkdoc [-l <perforce-label>] [<specfile>]
# #
osname=`uname -s | tr ' ' '_'`
osarch=`uname -m | tr ' ' '_'`
if [ ${osname:0:6} = "CYGWIN" ] ; then
osname="CYGWIN"
fi
if [ "$POCO_BASE" = "" ] ; then if [ "$POCO_BASE" = "" ] ; then
echo "Error: POCO_BASE not set." echo "Error: POCO_BASE not set."
exit 1 exit 1
@ -59,6 +66,14 @@ if [ "$version" = "" ] ; then
fi fi
release=$version$tag release=$version$tag
if [ ! -f libversion ] ; then
echo "Error: No libversion file found."
exit 2
fi
if [ "$libversion" = "" ] ; then
read libversion <$POCO_BASE/libversion
fi
# #
# Build release # Build release
# #
@ -74,16 +89,25 @@ cd $tools
./configure --no-tests --no-samples ./configure --no-tests --no-samples
make -s -j8 make -s -j8
cd $POCO_BASE if [ $osname = "CYGWIN" ] ; then
find $tools -type f -name "*.$libversion.dll" > $TMP/dlls
rebase -O -T $TMP/dlls
rm $TMP/dlls
fi
osname=`uname -s | tr ' ' '_'` cd $POCO_BASE
osarch=`uname -m | tr ' ' '_'`
if [ $osname = "Darwin" ] ; then if [ $osname = "Darwin" ] ; then
archpath=`dirname stage/tools/PocoDoc/bin/Darwin/*/PocoDoc` archpath=`dirname stage/tools/PocoDoc/bin/Darwin/*/PocoDoc`
osarch=`basename $archpath` osarch=`basename $archpath`
fi fi
if [ $osname = "CYGWIN" ] ; then
# Poco dlls must be on PATH for Cygwin
export PATH=$tools/lib/$osname/$osarch:$PATH
fi
export PATH=$tools/PocoDoc/bin/$osname/$osarch:$PATH export PATH=$tools/PocoDoc/bin/$osname/$osarch:$PATH
echo PATH=$PATH echo PATH=$PATH

View File

@ -123,6 +123,7 @@ echo "PocoDoc.output=$docPath" >>$build/PocoDoc.ini
echo "PocoDoc.version=$docVersion" >> $build/PocoDoc.ini echo "PocoDoc.version=$docVersion" >> $build/PocoDoc.ini
echo "Includes=$includes" >> $build/PocoDoc.ini echo "Includes=$includes" >> $build/PocoDoc.ini
echo "PocoDoc --config=$docConfig --config=$build/PocoDoc.ini"
PocoDoc --config=$docConfig --config=$build/PocoDoc.ini PocoDoc --config=$docConfig --config=$build/PocoDoc.ini
cd $dist cd $dist

View File

@ -209,16 +209,63 @@ ifndef POCO_BASE
$(warning WARNING: POCO_BASE is not defined. Assuming current directory.) $(warning WARNING: POCO_BASE is not defined. Assuming current directory.)
export POCO_BASE=$(shell pwd) export POCO_BASE=$(shell pwd)
endif endif
#$(info POCO_BASE = $(POCO_BASE))
ifndef POCO_PREFIX ifndef POCO_PREFIX
export POCO_PREFIX=/usr/local export POCO_PREFIX=/usr/local
endif endif
#$(info POCO_PREFIX=$(POCO_PREFIX))
ifndef POCO_BUILD ifndef POCO_BUILD
export POCO_BUILD=$(POCO_BASE) export POCO_BUILD=$(POCO_BASE)
endif endif
#$(info POCO_BUILD = $(POCO_BUILD))
LIBPREFIX ?= lib #
# Determine OS
#
POCO_HOST_OSNAME = $(shell uname)
ifeq ($(findstring CYGWIN,$(POCO_HOST_OSNAME)),CYGWIN)
POCO_HOST_OSNAME = CYGWIN
endif
ifeq ($(findstring MINGW,$(POCO_HOST_OSNAME)),MINGW)
POCO_HOST_OSNAME = MinGW
endif
#$(info POCO_HOST_OSNAME= $(POCO_HOST_OSNAME))
POCO_HOST_OSARCH ?= $(subst /,-,$(shell uname -m | tr ' ' _))
#$(info POCO_HOST_OSARCH= $(POCO_HOST_OSARCH))
#
# If POCO_CONFIG is not set, use the OS name as configuration name
#
ifndef POCO_CONFIG
POCO_CONFIG = $(POCO_HOST_OSNAME)
endif
#$(info POCO_CONFIG = $(POCO_CONFIG))
#
# Include System Specific Settings
#
include $(POCO_BASE)/build/config/$(POCO_CONFIG)
#
# Determine operating system
#
ifndef POCO_TARGET_OSNAME
OSNAME := $(POCO_HOST_OSNAME)
else
OSNAME := $(POCO_TARGET_OSNAME)
endif
#$(info OSNAME = $(OSNAME))
ifndef POCO_TARGET_OSARCH
OSARCH := $(POCO_HOST_OSARCH)
else
OSARCH := $(POCO_TARGET_OSARCH)
endif
#$(info OSARCH = $(OSARCH))
.PHONY: poco all libexecs cppunit tests samples cleans clean distclean install .PHONY: poco all libexecs cppunit tests samples cleans clean distclean install
@ -237,7 +284,7 @@ cppunit:
$(MAKE) -C $(POCO_BASE)/CppUnit $(MAKE) -C $(POCO_BASE)/CppUnit
CppUnit-clean: CppUnit-clean:
\$(MAKE) -C \$(POCO_BASE)/CppUnit clean $(MAKE) -C $(POCO_BASE)/CppUnit clean
install: libexecs install: libexecs
mkdir -p $(INSTALLDIR)/include/Poco mkdir -p $(INSTALLDIR)/include/Poco
@ -251,8 +298,12 @@ install: libexecs
find $(POCO_BUILD)/$$comp/bin -perm -700 -type f -exec cp -f {} $(INSTALLDIR)/bin \; ; \ find $(POCO_BUILD)/$$comp/bin -perm -700 -type f -exec cp -f {} $(INSTALLDIR)/bin \; ; \
fi ; \ fi ; \
done done
find $(POCO_BUILD)/lib -name "$(LIBPREFIX)Poco*" -type f -exec cp -f {} $(INSTALLDIR)/lib \; ifeq ($(OSNAME), CYGWIN)
find $(POCO_BUILD)/lib -name "$(LIBPREFIX)Poco*" -type l -exec cp -Rf {} $(INSTALLDIR)/lib \; find $(POCO_BUILD)/lib/$(OSNAME)/$(OSARCH) -name "cygPoco*" -type f -exec cp -f {} $(INSTALLDIR)/bin \;
find $(POCO_BUILD)/lib/$(OSNAME)/$(OSARCH) -name "cygPoco*" -type l -exec cp -Rf {} $(INSTALLDIR)/bin \;
endif
find $(POCO_BUILD)/lib/$(OSNAME)/$(OSARCH) -name "libPoco*" -type f -exec cp -f {} $(INSTALLDIR)/lib \;
find $(POCO_BUILD)/lib/$(OSNAME)/$(OSARCH) -name "libPoco*" -type l -exec cp -Rf {} $(INSTALLDIR)/lib \;
ENDOFSCRIPT ENDOFSCRIPT