mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 10:13:51 +01:00
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:
commit
3d1a094725
4
.gitignore
vendored
4
.gitignore
vendored
@ -104,7 +104,7 @@ lib64/
|
||||
pocomsg.h
|
||||
|
||||
# Eclipse generated files #
|
||||
######################
|
||||
###########################
|
||||
.project
|
||||
.cproject
|
||||
.settings
|
||||
@ -113,3 +113,5 @@ cmake-build/
|
||||
# Temporary files #
|
||||
###################
|
||||
*.bak
|
||||
stage/
|
||||
releases/
|
||||
|
10
.travis.yml
10
.travis.yml
@ -5,7 +5,10 @@ cache:
|
||||
|
||||
before_install:
|
||||
# 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 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)"
|
||||
compiler: gcc
|
||||
script:
|
||||
- sudo apt-get install -qq -y cmake3
|
||||
# disable tests, gcc-4.6 gets an internal compiler error
|
||||
- mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=OFF .. && make -j2 && cd ..
|
||||
|
||||
- env: TEST_NAME="gcc-4.8 (CMake)"
|
||||
compiler: gcc
|
||||
script:
|
||||
- sudo apt-get install -qq -y cmake3
|
||||
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install -qq -y g++-4.8
|
||||
@ -60,19 +61,16 @@ matrix:
|
||||
- env: TEST_NAME="clang (CMake)"
|
||||
compiler: clang
|
||||
script:
|
||||
- sudo apt-get install -qq -y cmake3
|
||||
- mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=ON .. && make -j2 && cd ..
|
||||
|
||||
- env: TEST_NAME="arm-linux-gnueabi-g++ (CMake)"
|
||||
script:
|
||||
- sudo apt-get install -qq -y cmake3
|
||||
- export CC="arm-linux-gnueabi-gcc"
|
||||
- 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 ..
|
||||
|
||||
- env: TEST_NAME="arm-linux-gnueabihf-g++ (CMake)"
|
||||
script:
|
||||
- sudo apt-get install -qq -y cmake3
|
||||
- export CC="arm-linux-gnueabihf-gcc"
|
||||
- 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 ..
|
||||
|
@ -49,5 +49,6 @@ Scott Davis
|
||||
Jeff Adams
|
||||
Martin Osborne
|
||||
Björn Schramke
|
||||
Francis Andre
|
||||
--
|
||||
$Id$
|
||||
|
@ -23,8 +23,12 @@ endif
|
||||
ifeq ($(LINKMODE),STATIC)
|
||||
LIBLINKEXT = .a
|
||||
else
|
||||
ifeq ($(OSNAME), CYGWIN)
|
||||
LIBLINKEXT = $(IMPLIBLINKEXT)
|
||||
else
|
||||
LIBLINKEXT = $(SHAREDLIBLINKEXT)
|
||||
endif
|
||||
endif
|
||||
|
||||
INCLUDE += -I$(POCO_ODBC_INCLUDE)
|
||||
SYSLIBS += -L$(POCO_ODBC_LIB)
|
||||
|
@ -48,6 +48,9 @@ if (POCO_UNBUNDLED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
set(SYSLIBS ${SYSLIBS} ${ZLIB_LIBRARIES})
|
||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||
|
||||
add_definitions(-DPOCO_UNBUNDLED)
|
||||
|
||||
else()
|
||||
# pcre
|
||||
POCO_SOURCES( SRCS pcre
|
||||
|
@ -46,6 +46,7 @@ pcre_utf8_objects = pcre_ucd pcre_tables
|
||||
|
||||
ifdef POCO_UNBUNDLED
|
||||
SYSLIBS += -lpcre -lz
|
||||
objects += $(pcre_utf8_objects)
|
||||
else
|
||||
objects += $(zlib_objects) $(pcre_objects) $(pcre_utf8_objects)
|
||||
endif
|
||||
|
@ -27,17 +27,19 @@
|
||||
#include <vector>
|
||||
|
||||
|
||||
#if defined(POCO_UNBUNDLED)
|
||||
#include <pcre.h>
|
||||
#else
|
||||
//
|
||||
// Copy these definitions from pcre.h
|
||||
// to avoid pulling in the entire header file
|
||||
//
|
||||
extern "C"
|
||||
{
|
||||
struct real_pcre8_or_16; /* declaration; the definition is private */
|
||||
typedef struct real_pcre8_or_16 pcre;
|
||||
struct pcre_extra;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
@ -4,4 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoFoundation )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoJSON PocoXML PocoFoundation)
|
||||
|
@ -12,6 +12,6 @@ objects = StringTokenizer
|
||||
|
||||
target = StringTokenizer
|
||||
target_version = 1
|
||||
target_libs = PocoFoundation
|
||||
target_libs = PocoJSON PocoXML PocoFoundation
|
||||
|
||||
include $(POCO_BASE)/build/rules/exec
|
||||
|
@ -4,4 +4,4 @@ set(LOCAL_SRCS "")
|
||||
aux_source_directory(src LOCAL_SRCS)
|
||||
|
||||
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoFoundation )
|
||||
target_link_libraries( ${SAMPLE_NAME} PocoJSON PocoXML PocoFoundation )
|
||||
|
@ -12,6 +12,6 @@ objects = URI
|
||||
|
||||
target = URI
|
||||
target_version = 1
|
||||
target_libs = PocoFoundation
|
||||
target_libs = PocoJSON PocoXML PocoFoundation
|
||||
|
||||
include $(POCO_BASE)/build/rules/exec
|
||||
|
@ -88,21 +88,27 @@ void FPETest::testFlags()
|
||||
volatile double b = 0;
|
||||
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));
|
||||
|
||||
FPE::clearFlags();
|
||||
a = 1.23456789e210;
|
||||
b = 9.87654321e210;
|
||||
c = mult(a, b);
|
||||
#if !defined(POCO_NO_FPENVIRONMENT)
|
||||
assert (FPE::isFlag(FPE::FP_OVERFLOW));
|
||||
#endif
|
||||
assertEqualDelta(c, c, 0);
|
||||
|
||||
FPE::clearFlags();
|
||||
a = 1.23456789e-99;
|
||||
b = 9.87654321e210;
|
||||
c = div(a, b);
|
||||
#if !defined(POCO_NO_FPENVIRONMENT)
|
||||
assert (FPE::isFlag(FPE::FP_UNDERFLOW));
|
||||
#endif
|
||||
assertEqualDelta(c, c, 0);
|
||||
}
|
||||
|
||||
@ -118,7 +124,7 @@ void FPETest::testFlags()
|
||||
|
||||
void FPETest::testRound()
|
||||
{
|
||||
#if !defined(__osf__) && !defined(__VMS)
|
||||
#if !defined(__osf__) && !defined(__VMS) && !defined(POCO_NO_FPENVIRONMENT)
|
||||
FPE::setRoundingMode(FPE::FP_ROUND_TONEAREST);
|
||||
assert (FPE::getRoundingMode() == FPE::FP_ROUND_TONEAREST);
|
||||
{
|
||||
|
@ -228,7 +228,11 @@ void FileTest::testFileAttributes2()
|
||||
void FileTest::testFileAttributes3()
|
||||
{
|
||||
#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)
|
||||
File f("CON");
|
||||
#endif
|
||||
|
@ -9,7 +9,6 @@
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "SharedMemoryTest.h"
|
||||
#include "CppUnit/TestCaller.h"
|
||||
#include "CppUnit/TestSuite.h"
|
||||
@ -35,7 +34,7 @@ SharedMemoryTest::~SharedMemoryTest()
|
||||
void SharedMemoryTest::testCreate()
|
||||
{
|
||||
SharedMemory mem("hi", 4096, SharedMemory::AM_WRITE);
|
||||
assert (mem.end()-mem.begin() == 4096);
|
||||
assert (mem.end()- mem.begin() == 4096);
|
||||
mem.begin()[0] = 'A';
|
||||
mem.end()[-1] = 'Z';
|
||||
}
|
||||
@ -89,8 +88,9 @@ CppUnit::Test* SharedMemoryTest::suite()
|
||||
{
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("SharedMemoryTest");
|
||||
|
||||
#if !defined(POCO_NO_SHAREDMEMORY)
|
||||
CppUnit_addTest(pSuite, SharedMemoryTest, testCreate);
|
||||
CppUnit_addTest(pSuite, SharedMemoryTest, testCreateFromFile);
|
||||
|
||||
#endif
|
||||
return pSuite;
|
||||
}
|
||||
|
@ -16,11 +16,13 @@
|
||||
#include "Poco/TimedNotificationQueue.h"
|
||||
#include "Poco/Notification.h"
|
||||
#include "Poco/Timestamp.h"
|
||||
#include "Poco/Clock.h"
|
||||
|
||||
|
||||
using Poco::TimedNotificationQueue;
|
||||
using Poco::Notification;
|
||||
using Poco::Timestamp;
|
||||
using Poco::Clock;
|
||||
|
||||
|
||||
namespace
|
||||
@ -71,13 +73,13 @@ void TimedNotificationQueueTest::testDequeue()
|
||||
assert (queue.size() == 0);
|
||||
pNf->release();
|
||||
|
||||
Poco::Timestamp ts1;
|
||||
Poco::Clock ts1;
|
||||
ts1 += 100000;
|
||||
Poco::Timestamp ts2;
|
||||
Poco::Clock ts2;
|
||||
ts2 += 200000;
|
||||
Poco::Timestamp ts3;
|
||||
Poco::Clock ts3;
|
||||
ts3 += 300000;
|
||||
Poco::Timestamp ts4;
|
||||
Poco::Clock ts4;
|
||||
ts4 += 400000;
|
||||
|
||||
queue.enqueueNotification(new QTestNotification("first"), ts1);
|
||||
|
58
Makefile
58
Makefile
@ -11,16 +11,60 @@ ifndef POCO_BASE
|
||||
$(warning WARNING: POCO_BASE is not defined. Assuming current directory.)
|
||||
export POCO_BASE=$(shell pwd)
|
||||
endif
|
||||
#$(info POCO_BASE = $(POCO_BASE))
|
||||
|
||||
ifndef POCO_PREFIX
|
||||
export POCO_PREFIX=/usr/local
|
||||
endif
|
||||
#$(info POCO_PREFIX= $(POCO_PREFIX))
|
||||
|
||||
ifndef POCO_BUILD
|
||||
export POCO_BUILD=$(POCO_BASE)
|
||||
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
|
||||
|
||||
@ -35,7 +79,7 @@ cppunit:
|
||||
$(MAKE) -C $(POCO_BASE)/CppUnit
|
||||
|
||||
CppUnit-clean:
|
||||
\$(MAKE) -C \$(POCO_BASE)/CppUnit clean
|
||||
$(MAKE) -C $(POCO_BASE)/CppUnit clean
|
||||
|
||||
install: libexecs
|
||||
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 \; ; \
|
||||
fi ; \
|
||||
done
|
||||
find $(POCO_BUILD)/lib -name "$(LIBPREFIX)Poco*" -type f -exec cp -f {} $(INSTALLDIR)/lib \;
|
||||
find $(POCO_BUILD)/lib -name "$(LIBPREFIX)Poco*" -type l -exec cp -Rf {} $(INSTALLDIR)/lib \;
|
||||
ifeq ($(OSNAME), CYGWIN)
|
||||
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
|
||||
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
|
||||
|
||||
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/samples clean
|
||||
|
||||
|
@ -12,6 +12,6 @@ objects = dict
|
||||
|
||||
target = dict
|
||||
target_version = 1
|
||||
target_libs = PocoUtil PocoNet PocoXML PocoFoundation
|
||||
target_libs = PocoUtil PocoNet PocoJSON PocoXML PocoFoundation
|
||||
|
||||
include $(POCO_BASE)/build/rules/exec
|
||||
|
@ -8,10 +8,15 @@
|
||||
|
||||
include $(POCO_BASE)/build/rules/global
|
||||
|
||||
# Where to find the PageCompiler executable
|
||||
PAGECOMPILER = $(POCO_BASE)/PageCompiler/bin/$(POCO_HOST_OSNAME)/$(POCO_HOST_OSARCH)/cpspc
|
||||
# Cygwin Poco*.dll should be on PATH
|
||||
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_version = 1
|
||||
|
2
PageCompiler/samples/HTTPTimeServer/src/.gitignore
vendored
Normal file
2
PageCompiler/samples/HTTPTimeServer/src/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/TimeHandler.h
|
||||
/TimeHandler.cpp
|
@ -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 << "";
|
||||
}
|
@ -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
|
@ -32,6 +32,7 @@
|
||||
<options>
|
||||
${Includes},
|
||||
-I/usr/local/mysql/include,
|
||||
-I/usr/include/mysql,
|
||||
-D_DEBUG,
|
||||
-E,
|
||||
-C,
|
||||
|
@ -33,6 +33,7 @@
|
||||
<options>
|
||||
${Includes},
|
||||
-I/usr/local/mysql/include,
|
||||
-I/usr/include/mysql,
|
||||
-D_DEBUG,
|
||||
-E,
|
||||
-C,
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
# CYGWIN
|
||||
#
|
||||
# Make settings for Cygwin on WinXP/gcc 3.4
|
||||
# Make settings for Cygwin
|
||||
#
|
||||
#
|
||||
|
||||
@ -20,7 +20,7 @@ CXX = g++
|
||||
LINK = $(CXX)
|
||||
LIB = ar -cr
|
||||
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
|
||||
STRIP =
|
||||
DEP = $(POCO_BASE)/build/script/makedepend.gcc
|
||||
@ -33,23 +33,30 @@ MKDIR = mkdir -p
|
||||
# Extension for Shared Libraries
|
||||
#
|
||||
LIBPREFIX = cyg
|
||||
SHAREDLIBEXT = .$(target_version).dll
|
||||
SHAREDLIBEXT = -$(target_version).dll
|
||||
SHAREDLIBLINKEXT = .dll
|
||||
|
||||
IMPPREFIX = lib
|
||||
IMPLIBEXT = -$(target_version).dll.a
|
||||
IMPLIBLINKEXT = .dll.a
|
||||
|
||||
#
|
||||
# Compiler and Linker Flags
|
||||
#
|
||||
CFLAGS =
|
||||
CFLAGS32 =
|
||||
CFLAGS64 =
|
||||
CXXFLAGS = -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY
|
||||
CFLAGS32 =
|
||||
CFLAGS64 =
|
||||
CXXFLAGS = -Wa,-mbig-obj -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING
|
||||
CXXFLAGS32 =
|
||||
CXXFLAGS64 =
|
||||
LINKFLAGS =
|
||||
LINKFLAGS32 =
|
||||
LINKFLAGS64 =
|
||||
STATICOPT_CC =
|
||||
STATICOPT_CXX =
|
||||
CXXFLAGS64 = -Wa,-mbig-obj
|
||||
SHLIBFLAGS = -Wl,--out-implib=$(dir $@)$(subst cyg,lib,$(notdir $@)).a -Wl,--export-all-symbols -Wl,--enable-auto-import
|
||||
SHLIBFLAGS32 =
|
||||
SHLIBFLAGS64 =
|
||||
LINKFLAGS =
|
||||
LINKFLAGS32 =
|
||||
LINKFLAGS64 =
|
||||
STATICOPT_CC =
|
||||
STATICOPT_CXX =
|
||||
STATICOPT_LINK = -static
|
||||
SHAREDOPT_CC =
|
||||
SHAREDOPT_CXX =
|
||||
@ -66,7 +73,19 @@ RELEASEOPT_LINK =
|
||||
#
|
||||
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
|
||||
#
|
||||
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
|
||||
|
@ -33,35 +33,35 @@ $(OBJPATH_RELEASE_STATIC) $(OBJPATH_DEBUG_STATIC) $(OBJPATH_RELEASE_SHARED) $(OB
|
||||
#
|
||||
# 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)"
|
||||
$(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)"
|
||||
$(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)"
|
||||
$(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)"
|
||||
$(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)"
|
||||
$(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)"
|
||||
$(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)"
|
||||
$(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)"
|
||||
$(CC) $(INCLUDE) $(CFLAGS) $(RELEASEOPT_CC) $(SHAREDOPT_CC) -c $< -o $@
|
||||
|
||||
|
@ -34,6 +34,7 @@ ifndef PROJECT_BASE
|
||||
PROJECT_BASE = $(POCO_BASE)
|
||||
endif
|
||||
export PROJECT_BASE
|
||||
$(info PROJECT_BASE = $(PROJECT_BASE))
|
||||
|
||||
#
|
||||
# Check for POCO_BUILD
|
||||
@ -42,6 +43,7 @@ ifndef POCO_BUILD
|
||||
POCO_BUILD = $(PROJECT_BASE)
|
||||
endif
|
||||
export POCO_BUILD
|
||||
$(info POCO_BUILD = $(POCO_BUILD))
|
||||
|
||||
#
|
||||
# POCO_BASE/POCO_BUILD/cwd sanity checks
|
||||
@ -74,7 +76,10 @@ 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))
|
||||
|
||||
#
|
||||
# Begin Sun platforms
|
||||
@ -110,6 +115,7 @@ endif
|
||||
ifndef POCO_CONFIG
|
||||
POCO_CONFIG = $(POCO_HOST_OSNAME)
|
||||
endif
|
||||
$(info POCO_CONFIG = $(POCO_CONFIG))
|
||||
|
||||
#
|
||||
# Include System Specific Settings
|
||||
@ -124,11 +130,15 @@ OSNAME := $(POCO_HOST_OSNAME)
|
||||
else
|
||||
OSNAME := $(POCO_TARGET_OSNAME)
|
||||
endif
|
||||
$(info OSNAME = $(OSNAME))
|
||||
|
||||
ifndef POCO_TARGET_OSARCH
|
||||
OSARCH := $(subst /,-,$(shell uname -m | tr ' ' _))
|
||||
else
|
||||
OSARCH := $(POCO_TARGET_OSARCH)
|
||||
endif
|
||||
$(info OSARCH = $(OSARCH))
|
||||
|
||||
HOSTNAME := $(shell hostname)
|
||||
|
||||
#
|
||||
@ -289,4 +299,3 @@ endif
|
||||
#
|
||||
export CC
|
||||
export CXX
|
||||
export LINK
|
||||
|
@ -11,8 +11,10 @@
|
||||
#
|
||||
ifdef target_version
|
||||
SHL_EXT = $(SHAREDLIBEXT)
|
||||
IMP_EXT = $(IMPLIBEXT)
|
||||
else
|
||||
SHL_EXT = $(SHAREDLIBLINKEXT)
|
||||
IMP_EXT = $(IMPLIBLINKEXT)
|
||||
endif
|
||||
|
||||
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_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_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)
|
||||
@echo "** Building shared library (debug)" $@
|
||||
$(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)
|
||||
$(postbuild)
|
||||
|
||||
$(LIB_RELEASE_SHARED): $(foreach o,$(objects),$(OBJPATH_RELEASE_SHARED)/$(o).o)
|
||||
@echo "** Building shared library (release)" $@
|
||||
$(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)
|
||||
$(STRIPCMD)
|
||||
$(postbuild)
|
||||
|
@ -4,24 +4,63 @@
|
||||
#
|
||||
# A script for running the POCO testsuites.
|
||||
#
|
||||
# usage: runtests
|
||||
# usage: runtests [component [test] ]
|
||||
#
|
||||
# If the environment variable EXCLUDE_TESTS is set, containing
|
||||
# a space-separated list of project names (as found in the
|
||||
# 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
|
||||
TESTRUNNERARGS=-all
|
||||
|
||||
components=`cat $POCO_BASE/components`
|
||||
|
||||
if [ "$OSNAME" = "" ] ; then
|
||||
OSNAME=`uname`
|
||||
if [ "$1" = "" ] ; then
|
||||
components=`cat $POCO_BASE/components`
|
||||
else
|
||||
components=$1
|
||||
fi
|
||||
|
||||
if [ "$2" = "" ] ; then
|
||||
TESTRUNNERARGS=-all
|
||||
else
|
||||
TESTRUNNERARGS=$2
|
||||
fi
|
||||
|
||||
if [ "$OSARCH" = "" ] ; then
|
||||
OSARCH=`uname -m | tr ' /' _-`
|
||||
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/"
|
||||
|
||||
runs=0
|
||||
@ -39,19 +78,19 @@ do
|
||||
fi
|
||||
done
|
||||
if [ $excluded -eq 0 ] ; then
|
||||
if [ -d "$POCO_BASE/$comp/testsuite/$BINDIR" ] ; then
|
||||
if [ -x "$POCO_BASE/$comp/testsuite/$BINDIR/$TESTRUNNER" ] ; then
|
||||
if [ -d "$POCO_BUILD/$comp/testsuite/$BINDIR" ] ; then
|
||||
if [ -x "$POCO_BUILD/$comp/testsuite/$BINDIR/$TESTRUNNER" ] ; then
|
||||
echo ""
|
||||
echo ""
|
||||
echo "****************************************"
|
||||
echo "*** $comp"
|
||||
echo "*** $OSNAME $OSARCH $comp"
|
||||
echo "****************************************"
|
||||
echo ""
|
||||
|
||||
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
|
||||
failues=`expr $failures + 1`
|
||||
failures=`expr $failures + 1`
|
||||
failedTests="$failedTests $comp"
|
||||
status=1
|
||||
fi
|
||||
|
@ -48,19 +48,23 @@ if(MSVC)
|
||||
else(MSVC)
|
||||
# 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(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
|
||||
endif(MSVC)
|
||||
|
||||
|
||||
|
||||
# Add a d postfix to the debug libraries
|
||||
if(POCO_STATIC)
|
||||
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_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)
|
||||
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_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()
|
||||
|
||||
|
||||
@ -72,23 +76,28 @@ if(WIN32)
|
||||
add_definitions( -DPOCO_OS_FAMILY_WINDOWS -DUNICODE -D_UNICODE -D__LCC__) #__LCC__ define used by MySQL.h
|
||||
endif(WIN32)
|
||||
|
||||
if (UNIX AND NOT ANDROID )
|
||||
add_definitions( -DPOCO_OS_FAMILY_UNIX )
|
||||
# Standard 'must be' defines
|
||||
if (APPLE)
|
||||
add_definitions( -DPOCO_HAVE_IPv6 -DPOCO_NO_STAT64)
|
||||
set(SYSLIBS dl)
|
||||
else (APPLE)
|
||||
add_definitions( -D_REENTRANT -D_THREAD_SAFE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 )
|
||||
if (QNX)
|
||||
add_definitions( -DPOCO_HAVE_FD_POLL)
|
||||
set(SYSLIBS m socket)
|
||||
else (QNX)
|
||||
add_definitions( -D_XOPEN_SOURCE=500 -DPOCO_HAVE_FD_EPOLL)
|
||||
set(SYSLIBS pthread dl rt)
|
||||
endif (QNX)
|
||||
endif (APPLE)
|
||||
endif(UNIX AND NOT ANDROID )
|
||||
if (CYGWIN)
|
||||
add_definitions(-DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING)
|
||||
add_definitions(-D_XOPEN_SOURCE=500 -D__BSD_VISIBLE)
|
||||
else (CYGWIN)
|
||||
if (UNIX AND NOT ANDROID )
|
||||
add_definitions( -DPOCO_OS_FAMILY_UNIX )
|
||||
# Standard 'must be' defines
|
||||
if (APPLE)
|
||||
add_definitions( -DPOCO_HAVE_IPv6 -DPOCO_NO_STAT64)
|
||||
set(SYSLIBS dl)
|
||||
else (APPLE)
|
||||
add_definitions( -D_REENTRANT -D_THREAD_SAFE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 )
|
||||
if (QNX)
|
||||
add_definitions( -DPOCO_HAVE_FD_POLL)
|
||||
set(SYSLIBS m socket)
|
||||
else (QNX)
|
||||
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")
|
||||
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)
|
||||
endif (CMAKE_COMPILER_IS_MINGW)
|
||||
|
||||
if (CYGWIN)
|
||||
# add_definitions(-DWC_NO_BEST_FIT_CHARS=0x400 -DPOCO_WIN32_UTF8)
|
||||
endif (CYGWIN)
|
||||
|
||||
# SunPro C++
|
||||
if (${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
|
||||
add_definitions( -D_BSD_SOURCE -library=stlport4)
|
||||
|
@ -14,6 +14,13 @@
|
||||
# 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
|
||||
echo "Error: POCO_BASE not set."
|
||||
exit 1
|
||||
@ -59,6 +66,14 @@ if [ "$version" = "" ] ; then
|
||||
fi
|
||||
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
|
||||
#
|
||||
@ -74,16 +89,25 @@ cd $tools
|
||||
./configure --no-tests --no-samples
|
||||
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 ' ' '_'`
|
||||
osarch=`uname -m | tr ' ' '_'`
|
||||
cd $POCO_BASE
|
||||
|
||||
if [ $osname = "Darwin" ] ; then
|
||||
archpath=`dirname stage/tools/PocoDoc/bin/Darwin/*/PocoDoc`
|
||||
osarch=`basename $archpath`
|
||||
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
|
||||
echo PATH=$PATH
|
||||
|
||||
|
@ -123,6 +123,7 @@ echo "PocoDoc.output=$docPath" >>$build/PocoDoc.ini
|
||||
echo "PocoDoc.version=$docVersion" >> $build/PocoDoc.ini
|
||||
echo "Includes=$includes" >> $build/PocoDoc.ini
|
||||
|
||||
echo "PocoDoc --config=$docConfig --config=$build/PocoDoc.ini"
|
||||
PocoDoc --config=$docConfig --config=$build/PocoDoc.ini
|
||||
|
||||
cd $dist
|
||||
|
@ -209,16 +209,63 @@ ifndef POCO_BASE
|
||||
$(warning WARNING: POCO_BASE is not defined. Assuming current directory.)
|
||||
export POCO_BASE=$(shell pwd)
|
||||
endif
|
||||
#$(info POCO_BASE = $(POCO_BASE))
|
||||
|
||||
ifndef POCO_PREFIX
|
||||
export POCO_PREFIX=/usr/local
|
||||
endif
|
||||
#$(info POCO_PREFIX=$(POCO_PREFIX))
|
||||
|
||||
ifndef POCO_BUILD
|
||||
export POCO_BUILD=$(POCO_BASE)
|
||||
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
|
||||
|
||||
@ -237,7 +284,7 @@ cppunit:
|
||||
$(MAKE) -C $(POCO_BASE)/CppUnit
|
||||
|
||||
CppUnit-clean:
|
||||
\$(MAKE) -C \$(POCO_BASE)/CppUnit clean
|
||||
$(MAKE) -C $(POCO_BASE)/CppUnit clean
|
||||
|
||||
install: libexecs
|
||||
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 \; ; \
|
||||
fi ; \
|
||||
done
|
||||
find $(POCO_BUILD)/lib -name "$(LIBPREFIX)Poco*" -type f -exec cp -f {} $(INSTALLDIR)/lib \;
|
||||
find $(POCO_BUILD)/lib -name "$(LIBPREFIX)Poco*" -type l -exec cp -Rf {} $(INSTALLDIR)/lib \;
|
||||
ifeq ($(OSNAME), CYGWIN)
|
||||
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user