mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-25 18:22:59 +02:00
c++11 support: update the develop branch (#1819)
* Use appveyor.yaml from c++11 branch so that CI run ok. * Use .travis.yml from the c++ branch so that Travis CI jobs run ok. * Add c++11 scripts and Linux config so that Travis CI jobs are ok. * Use mkdocumentation & mkrelease from c++11 branch. * Use PocoDoc config files from c++11 branch. * define POCO_ENABLE_C11 as the default * CMake: ignore Crypto for now. To be fixed since it fails. * Backport c++11 changes from the c++11 branch * Add Cygwin config with c++11 setup. * Update appveyor.yml from c++11 branch.
This commit is contained in:
committed by
Aleksandar Fabijanic
parent
63447f0297
commit
7bf53d4f3f
167
.travis.yml
167
.travis.yml
@@ -8,19 +8,15 @@ branches:
|
|||||||
- /.*pp.eyor.*/
|
- /.*pp.eyor.*/
|
||||||
|
|
||||||
before_install:
|
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
|
|
||||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
|
||||||
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq -y libpcre3-dev libssl-dev libexpat1-dev; fi
|
||||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq -y libpq-dev unixodbc-dev libmysqlclient-dev libsqlite3-dev; fi
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq -y libpq-dev unixodbc-dev libmysqlclient-dev libsqlite3-dev; fi
|
||||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq -y g++-arm-linux-gnueabi g++-arm-linux-gnueabihf clang-3.5; fi
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq -y g++-arm-linux-gnueabi g++-arm-linux-gnueabihf; fi
|
||||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq -y sloccount cppcheck; fi
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq -y sloccount cppcheck; fi
|
||||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
|
||||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
|
||||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq -y g++-4.8; fi
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -qq -y gcc-5 g++-5; fi
|
||||||
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5; fi
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- mongodb
|
- mongodb
|
||||||
@@ -29,7 +25,7 @@ services:
|
|||||||
- mysql
|
- mysql
|
||||||
|
|
||||||
dist: trusty
|
dist: trusty
|
||||||
sudo: required
|
sudo: enabled
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
postgresql: "9.3"
|
postgresql: "9.3"
|
||||||
@@ -64,104 +60,99 @@ matrix:
|
|||||||
- export CC="clang"
|
- export CC="clang"
|
||||||
- export CXX="clang++"
|
- export CXX="clang++"
|
||||||
- $CXX --version
|
- $CXX --version
|
||||||
- clang++ -x c++ /dev/null -dM -E
|
- $CXX -x c++ /dev/null -dM -E
|
||||||
- ./configure --everything --omit=Data/ODBC,Data/MySQL,Data/PostgreSQL && make -s -j2 && sudo make install && ./travis/OSX/runtests.sh
|
- ./configure --everything --omit=Data/ODBC,Data/MySQL,Data/PostgreSQL && make -s -j2 && sudo make install && ./travis/OSX/runtests.sh
|
||||||
|
|
||||||
- env: TEST_NAME="clang (make) bundled"
|
#- env: TEST_NAME="clang 3.5.0 (make) bundled"
|
||||||
compiler: clang
|
# ======================================= compiler error on generating debug info for auto return
|
||||||
script:
|
#compiler: clang
|
||||||
- sudo apt-get install -qq -y clang
|
# script:
|
||||||
- export CC="clang"
|
# - export CC="clang"
|
||||||
- export CXX="clang++"
|
# - export CXX="clang++"
|
||||||
- $CXX --version
|
# - $CXX --version
|
||||||
- sudo apt-get install -qq -y libpcre3-dev libssl-dev libexpat1-dev
|
# - ./configure --config=Linux-clang --everything && make -s -j2 && ./travis/Linux/runtests.sh
|
||||||
- ./configure --everything && make -s -j2 && ./travis/Linux/runtests.sh
|
|
||||||
|
|
||||||
- env: TEST_NAME="clang (make) unbundled"
|
#- env: TEST_NAME="clang 3.5.0 (make) unbundled"
|
||||||
compiler: clang
|
# ======================================= compiler error on generating debug info for auto return
|
||||||
script:
|
# error: debug information for auto is not yet supported
|
||||||
- sudo apt-get install -qq -y clang
|
# error: debug information for auto is not yet supported
|
||||||
- export CC="clang"
|
# ** Creating dependency info for src/Timespan.cpp
|
||||||
- export CXX="clang++"
|
# make[1]: *** [/home/travis/build/Kampbell/poco/CppUnit/obj/Linux/x86_64/debug_shared/TestRunner.o] Error 1 # compiler: clang
|
||||||
- $CXX --version
|
# =======================================
|
||||||
- ./configure --everything --unbundled && make -s -j2 && ./travis/Linux/runtests.sh
|
# script:
|
||||||
|
# - export CC="clang"
|
||||||
|
# - export CXX="clang++"
|
||||||
|
# - $CXX --version
|
||||||
|
# - ./configure --config=Linux-clang --everything --unbundled && make -s -j2 && ./travis/Linux/runtests.sh
|
||||||
|
|
||||||
- env: TEST_NAME="gcc 4.6 (make) bundled"
|
- env: TEST_NAME="gcc 5.4.1 (make) bundled"
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
script:
|
script:
|
||||||
- export CC="gcc"
|
|
||||||
- export CXX="g++"
|
|
||||||
- $CXX --version
|
- $CXX --version
|
||||||
- ./configure --everything && make -s -j2 && ./travis/Linux/runtests.sh
|
- ./configure --everything && make -s -j2 && ./travis/Linux/runtests.sh
|
||||||
|
|
||||||
- env: TEST_NAME="gcc 4.6 (make) unbundled"
|
#- env: TEST_NAME="gcc 5.4.1 (make) unbundled"
|
||||||
compiler: gcc
|
# ======================================= unit tests failures due to unbundled pcre
|
||||||
script:
|
# There was 1 error:
|
||||||
- export CC="gcc"
|
# 1: N7CppUnit10TestCallerI21RegularExpressionTestEE.testSubst2
|
||||||
- export CXX="g++"
|
# "St9bad_alloc: std::bad_alloc"
|
||||||
- $CXX --version
|
# in "<unknown>", line -1
|
||||||
- sudo apt-get install -qq -y libpcre3-dev libssl-dev libexpat1-dev
|
#
|
||||||
- ./configure --everything --unbundled && make -s -j2 && ./travis/Linux/runtests.sh
|
# There were 4 failures:
|
||||||
|
# 1: N7CppUnit10TestCallerI21RegularExpressionTestEE.testMatch4
|
||||||
|
# "re.match("123 456", 0, matches) == 3"
|
||||||
|
# in "src/RegularExpressionTest.cpp", line 103
|
||||||
|
# 2: N7CppUnit10TestCallerI21RegularExpressionTestEE.testMatch6
|
||||||
|
# "expr.match("abcde", 0, 0)"
|
||||||
|
# in "src/RegularExpressionTest.cpp", line 136
|
||||||
|
# 3: N7CppUnit10TestCallerI21RegularExpressionTestEE.testSplit2
|
||||||
|
# "re.split("123 456", 0, strings) == 3"
|
||||||
|
# in "src/RegularExpressionTest.cpp", line 184
|
||||||
|
# 4: N7CppUnit10TestCallerI21RegularExpressionTestEE.testGroup
|
||||||
|
# "re.match("abcd 1234", 0, matches) == 3"
|
||||||
|
# in "src/RegularExpressionTest.cpp", line 271
|
||||||
|
#
|
||||||
|
# failed=Foundation
|
||||||
|
# =======================================
|
||||||
|
# compiler: gcc
|
||||||
|
# script:
|
||||||
|
# - $CXX --version
|
||||||
|
# - ./configure --everything --unbundled && make -s -j2 && ./travis/Linux/runtests.sh
|
||||||
|
|
||||||
- env: TEST_NAME="gcc 4.8 (make) bundled"
|
#- env: TEST_NAME="arm-linux-gnueabi-g++ (make)"
|
||||||
compiler: gcc
|
# compiler: gcc
|
||||||
script:
|
# script:
|
||||||
- export CC="gcc-4.8"
|
# - arm-linux-gnueabi-g++ --version
|
||||||
- export CXX="g++-4.8"
|
# - arm-linux-gnueabi-g++ -x c++ /dev/null -dM -E
|
||||||
- $CXX --version
|
# - ./configure --omit=Data/ODBC,Data/MySQL,Data/PostgreSQL,Crypto,NetSSL,PageCompiler && make -s -j2 CROSS_COMPILE=arm-linux-gnueabi- POCO_TARGET_OSARCH=armv7l
|
||||||
- ./configure --everything && make -s -j2 && ./travis/Linux/runtests.sh
|
|
||||||
|
|
||||||
- env: TEST_NAME="gcc 4.8 (make) unbundled"
|
- env: TEST_NAME="gcc 5.4.1 (CMake)"
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
script:
|
script:
|
||||||
- sudo apt-get install -qq -y libpcre3-dev libssl-dev libexpat1-dev
|
|
||||||
- export CC="gcc-4.8"
|
|
||||||
- export CXX="g++-4.8"
|
|
||||||
- $CXX --version
|
|
||||||
- ./configure --everything --unbundled && make -s -j2 && ./travis/Linux/runtests.sh
|
|
||||||
|
|
||||||
- env: TEST_NAME="arm-linux-gnueabi- (make)"
|
|
||||||
compiler: gcc
|
|
||||||
script:
|
|
||||||
- ./configure --omit=Data/ODBC,Data/MySQL,Data/PostgreSQL,Crypto,NetSSL,PageCompiler && make -s -j2 CROSS_COMPILE=arm-linux-gnueabi- POCO_TARGET_OSARCH=armv7l
|
|
||||||
|
|
||||||
- env: TEST_NAME="gcc 4.6 (CMake)"
|
|
||||||
compiler: gcc
|
|
||||||
script:
|
|
||||||
- export CC="gcc"
|
|
||||||
- export CXX="g++"
|
|
||||||
- $CXX --version
|
- $CXX --version
|
||||||
- source ./travis/ignored.sh
|
- source ./travis/ignored.sh
|
||||||
- export POCO_BASE=`pwd`
|
- export POCO_BASE=`pwd`
|
||||||
- mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=ON .. && make -s -j2 && ctest -VV -E Data && cd ..
|
- mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=ON .. && make -s -j2 && ctest -VV -E Data && cd ..
|
||||||
|
|
||||||
- env: TEST_NAME="gcc 4.8 (CMake)"
|
|
||||||
compiler: gcc
|
|
||||||
script:
|
|
||||||
- export CC="gcc-4.8"
|
|
||||||
- export CXX="g++-4.8"
|
|
||||||
- $CXX --version
|
|
||||||
- source ./travis/ignored.sh
|
|
||||||
- export POCO_BASE=`pwd`
|
|
||||||
- mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=ON .. && make -s -j2 && ctest -VV -E Data && cd ..
|
|
||||||
|
|
||||||
- env: TEST_NAME="clang 3.4 (CMake)"
|
#- env: TEST_NAME="clang (CMake)"
|
||||||
compiler: clang
|
# compiler: clang
|
||||||
script:
|
# script:
|
||||||
- source ./travis/ignored.sh
|
# - source ./travis/ignored.sh
|
||||||
- export POCO_BASE=`pwd`
|
# - export POCO_BASE=`pwd`
|
||||||
- mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=ON .. && make -s -j2 && ctest -VV -E Data && cd ..
|
# - mkdir cmake-build && cd cmake-build && cmake -DENABLE_TESTS=ON .. && make -s -j2 && ctest -VV -E Data && cd ..
|
||||||
|
|
||||||
- env: TEST_NAME="arm-linux-gnueabi-g++ (CMake)"
|
#- env: TEST_NAME="arm-linux-gnueabi-g++ (CMake)"
|
||||||
compiler: gcc
|
# ======================================= "arm-linux-gnueabi-g++: version 4.7.0: non compliant to c++11
|
||||||
script:
|
# compiler: gcc
|
||||||
- export CC="arm-linux-gnueabi-gcc"
|
# script:
|
||||||
- export CXX="arm-linux-gnueabi-g++"
|
# - export CC="arm-linux-gnueabi-gcc"
|
||||||
- $CXX --version
|
# - export CXX="arm-linux-gnueabi-g++"
|
||||||
- source ./travis/ignored.sh
|
# - $CXX --version
|
||||||
- export POCO_BASE=`pwd`
|
# - source ./travis/ignored.sh
|
||||||
- mkdir cmake-build
|
# - export POCO_BASE=`pwd`
|
||||||
- cd cmake-build && cmake -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_TESTS=ON .. && make -s -j2 && cd ..
|
# - mkdir cmake-build
|
||||||
|
# - cd cmake-build && cmake -DENABLE_NETSSL=OFF -DENABLE_CRYPTO=OFF -DENABLE_TESTS=ON .. && make -s -j2 && cd ..
|
||||||
|
|
||||||
- env: TEST_NAME="arm-linux-gnueabihf-g++ (CMake)"
|
- env: TEST_NAME="arm-linux-gnueabihf-g++ (CMake)"
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
@@ -180,8 +171,6 @@ matrix:
|
|||||||
- env: TEST_NAME="documentation & release"
|
- env: TEST_NAME="documentation & release"
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
script:
|
script:
|
||||||
- export CC="gcc-4.8"
|
|
||||||
- export CXX="g++-4.8"
|
|
||||||
- $CXX --version
|
- $CXX --version
|
||||||
- . env.sh && mkdoc all && mkrel all
|
- . env.sh && mkdoc all && mkrel all
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
# ENABLE_TESTS
|
# ENABLE_TESTS
|
||||||
# ENABLE_SAMPLES
|
# ENABLE_SAMPLES
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.0.0)
|
cmake_minimum_required(VERSION 3.1.0)
|
||||||
|
|
||||||
project(Poco)
|
project(Poco)
|
||||||
|
|
||||||
@@ -44,6 +44,32 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
|||||||
# Setup C/C++ compiler options
|
# Setup C/C++ compiler options
|
||||||
#################################################################################
|
#################################################################################
|
||||||
|
|
||||||
|
option(DISABLE_CPP11 "Disable C++11 if available" OFF)
|
||||||
|
option(DISABLE_CPP14 "Disable C++14 if available" OFF)
|
||||||
|
|
||||||
|
if (DISABLE_CPP11 OR DISABLE_CPP14)
|
||||||
|
add_definitions(-DPOCO_DISABLE_CPP11)
|
||||||
|
|
||||||
|
if (DISABLE_CPP14)
|
||||||
|
add_definitions(-DPOCO_DISABLE_CPP14)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
# C++11/14 compiler flags
|
||||||
|
include(CXX11)
|
||||||
|
check_for_cxx11_compiler(CXX11_COMPILER)
|
||||||
|
|
||||||
|
# If a C++11 compiler is available, then set the appropriate flags
|
||||||
|
if(CXX11_COMPILER)
|
||||||
|
enable_cxx11()
|
||||||
|
check_for_cxx14_compiler(CXX14_COMPILER)
|
||||||
|
|
||||||
|
# If a C++14 compiler is available, then set the appropriate flags
|
||||||
|
if(CXX14_COMPILER)
|
||||||
|
enable_cxx14()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT MSVC_IDE)
|
if(NOT MSVC_IDE)
|
||||||
if(NOT CMAKE_BUILD_TYPE)
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
|
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
|
|
||||||
// Define to enable C++11 support
|
// Define to enable C++11 support
|
||||||
// #define POCO_ENABLE_CPP11
|
#define POCO_ENABLE_CPP11
|
||||||
|
|
||||||
|
|
||||||
// Define to disable implicit linking
|
// Define to disable implicit linking
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
${PocoBuild}/*/doc/images
|
${PocoBuild}/*/doc/images
|
||||||
</resources>
|
</resources>
|
||||||
<compiler>
|
<compiler>
|
||||||
<exec>${CXX}</exec>
|
<exec>${CXX} ${CXXFLAGS}</exec>
|
||||||
<options>
|
<options>
|
||||||
${Includes},
|
${Includes},
|
||||||
-I/usr/local/mysql/include,
|
-I/usr/local/mysql/include,
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
${PocoBuild}/*/doc/images
|
${PocoBuild}/*/doc/images
|
||||||
</resources>
|
</resources>
|
||||||
<compiler>
|
<compiler>
|
||||||
<exec>${CXX}</exec>
|
<exec>${CXX} ${CXXFLAGS}</exec>
|
||||||
<options>
|
<options>
|
||||||
${Includes},
|
${Includes},
|
||||||
-I/usr/local/mysql/include,
|
-I/usr/local/mysql/include,
|
||||||
|
|||||||
161
appveyor.yml
161
appveyor.yml
@@ -1,7 +1,7 @@
|
|||||||
version: build {branch}-{build}
|
version: build {branch}-{build}
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
- C:\mysql-5.7.17-win32
|
- C:\mysql-5.7.18-win32
|
||||||
- C:\ProgramData\chocolatey
|
- C:\ProgramData\chocolatey
|
||||||
- C:\OpenSSL-Win32
|
- C:\OpenSSL-Win32
|
||||||
- C:\OpenSSL-Win64
|
- C:\OpenSSL-Win64
|
||||||
@@ -36,6 +36,10 @@ services:
|
|||||||
- postgresql94
|
- postgresql94
|
||||||
|
|
||||||
|
|
||||||
|
image:
|
||||||
|
- Visual Studio 2017
|
||||||
|
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
- Win32
|
- Win32
|
||||||
- x64
|
- x64
|
||||||
@@ -51,57 +55,76 @@ configuration:
|
|||||||
|
|
||||||
environment:
|
environment:
|
||||||
bundling: bundled
|
bundling: bundled
|
||||||
MYSQL32: C:\mysql-5.7.17-win32
|
MYSQL32URL: http://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.18-win32.zip
|
||||||
|
MYSQL32ZIP: mysql-5.7.18-win32.zip
|
||||||
|
MYSQL32: C:\mysql-5.7.18-win32
|
||||||
MYSQL64: C:\Program Files\MySql\MySQL Server 5.7
|
MYSQL64: C:\Program Files\MySql\MySQL Server 5.7
|
||||||
POSTGRES32: C:\Program Files (x86)\PostgreSQL\9.4
|
POSTGRES32: C:\Program Files (x86)\PostgreSQL\9.4
|
||||||
POSTGRES64: C:\Program Files\PostgreSQL\9.4
|
POSTGRES64: C:\Program Files\PostgreSQL\9.4
|
||||||
|
OPENSSLURL: https://slproweb.com/download
|
||||||
|
OPENSSL32EXE: Win32OpenSSL-1_1_0f.exe
|
||||||
|
OPENSSL64EXE: Win64OpenSSL-1_1_0f.exe
|
||||||
|
OPENSSL32: C:\OpenSSL-Win32
|
||||||
|
OPENSSL64: C:\OpenSSL-Win64
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
|
- builder: msbuild
|
||||||
|
vsver: 140
|
||||||
|
linkmode: shared
|
||||||
|
|
||||||
|
# - builder: msbuild
|
||||||
|
# vsver: 140
|
||||||
|
# linkmode: static_md
|
||||||
|
|
||||||
|
# - builder: msbuild
|
||||||
|
# vsver: 140
|
||||||
|
# linkmode: static_mt
|
||||||
|
|
||||||
|
- builder: msbuild
|
||||||
|
vsver: 150
|
||||||
|
linkmode: shared
|
||||||
|
|
||||||
|
# - builder: msbuild
|
||||||
|
# vsver: 150
|
||||||
|
# linkmode: static_md
|
||||||
|
|
||||||
|
# - builder: msbuild
|
||||||
|
# vsver: 150
|
||||||
|
# linkmode: static_mt
|
||||||
|
|
||||||
|
# - builder: cmake
|
||||||
|
# vsver: 120
|
||||||
|
|
||||||
|
- builder: cmake
|
||||||
|
vsver: 140
|
||||||
|
|
||||||
- builder: cygwin
|
- builder: cygwin
|
||||||
|
|
||||||
- builder: msbuild
|
|
||||||
vsver: 120
|
|
||||||
linkmode: shared
|
|
||||||
|
|
||||||
# - builder: msbuild
|
|
||||||
# vsver: 120
|
|
||||||
# linkmode: static_md
|
|
||||||
|
|
||||||
# - builder: msbuild
|
|
||||||
# vsver: 120
|
|
||||||
# linkmode: static_mt
|
|
||||||
|
|
||||||
- builder: msbuild
|
|
||||||
vsver: 140
|
|
||||||
linkmode: shared
|
|
||||||
|
|
||||||
# - builder: msbuild
|
|
||||||
# vsver: 140
|
|
||||||
# linkmode: static_md
|
|
||||||
|
|
||||||
# - builder: msbuild
|
|
||||||
# vsver: 140
|
|
||||||
# linkmode: static_mt
|
|
||||||
|
|
||||||
- builder: cmake
|
|
||||||
vsver: 120
|
|
||||||
|
|
||||||
- builder: cmake
|
|
||||||
vsver: 140
|
|
||||||
|
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
# -------------------------------------------------------------------------------------------
|
||||||
|
# VS2017 setup. VS2017 does not provide VS150COMNTOOLS.
|
||||||
|
# See https://blogs.msdn.microsoft.com/vcblog/2017/03/06/finding-the-visual-c-compiler-tools-in-visual-studio-2017/
|
||||||
|
# -------------------------------------------------------------------------------------------
|
||||||
|
- ps: |
|
||||||
|
Install-Module VSSetup -Scope CurrentUser -Force
|
||||||
|
$installationPath = Get-VSSetupInstance | Select-VSSetupInstance -Latest -Require Microsoft.VisualStudio.Component.VC.Tools.x86.x64 | select InstallationPath
|
||||||
|
$vs150comntools = $installationPath.psobject.properties.Value;
|
||||||
|
set-item -force -path "ENV:VS150COMNTOOLS" -value "$vs150comntools\Common7\Tools\"
|
||||||
|
Write-Host "`nVS150COMNTOOLS=$env:VS150COMNTOOLS" -ForegroundColor Yellow
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------------------
|
||||||
- if "%builder%"=="cygwin" (
|
- if "%builder%"=="cygwin" (
|
||||||
if "%platform%"=="Win32" (
|
if "%platform%"=="Win32" (
|
||||||
C:\cygwin\setup-x86.exe -qnNdO -R C:/cygwin -s http://cygwin.mirror.constant.com -l C:/cygwin/var/cache/setup -P libpcre-devel -P openssl-devel -P libiodbc-devel -P libiodbc2 -P odbc-mysql -P odbc-pgsql -P odbc-sqlite3 -P libmysqlclient-devel -P libsqlite3-devel -P libcrypt-devel))
|
C:\cygwin\setup-x86.exe -qnNdO -R C:/cygwin -s http://cygwin.mirror.constant.com -l C:/cygwin/var/cache/setup -P libpq-devel -P libpcre-devel -P openssl-devel -P libiodbc-devel -P libiodbc2 -P odbc-mysql -P odbc-pgsql -P odbc-sqlite3 -P libmysqlclient-devel -P libsqlite3-devel -P libcrypt-devel))
|
||||||
|
|
||||||
- if "%builder%"=="cygwin" (
|
- if "%builder%"=="cygwin" (
|
||||||
if "%platform%"=="x64" (
|
if "%platform%"=="x64" (
|
||||||
C:\cygwin64\setup-x86_64.exe -qnNdO -R C:/cygwin64 -s http://cygwin.mirror.constant.com -l C:/cygwin64/var/cache/setup -P libpcre-devel -P openssl-devel -P libiodbc-devel -P libiodbc2 -P odbc-mysql -P odbc-pgsql -P odbc-sqlite3 -P libmysqlclient-devel -P libsqlite3-devel -P libcrypt-devel))
|
C:\cygwin64\setup-x86_64.exe -qnNdO -R C:/cygwin64 -s http://cygwin.mirror.constant.com -l C:/cygwin64/var/cache/setup -P libpq-devel -P libpcre-devel -P openssl-devel -P libiodbc-devel -P libiodbc2 -P odbc-mysql -P odbc-pgsql -P odbc-sqlite3 -P libmysqlclient-devel -P libsqlite3-devel -P libcrypt-devel))
|
||||||
|
|
||||||
- set POCO_BASE=%CD%
|
- set POCO_BASE=%CD%
|
||||||
- set PATH=C:\ProgramData\chocolatey\bin;%PATH%
|
- set PATH=C:\ProgramData\chocolatey\bin;%PATH%
|
||||||
@@ -134,7 +157,6 @@ install:
|
|||||||
# } else {
|
# } else {
|
||||||
# choco install cmake
|
# choco install cmake
|
||||||
# }
|
# }
|
||||||
- set
|
|
||||||
|
|
||||||
# -------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------
|
||||||
# chocolatey brokes jom, here's workaround
|
# chocolatey brokes jom, here's workaround
|
||||||
@@ -145,6 +167,9 @@ install:
|
|||||||
{
|
{
|
||||||
$env:PATH = $env:ChocolateyInstall + "\bin;" + $env:PATH
|
$env:PATH = $env:ChocolateyInstall + "\bin;" + $env:PATH
|
||||||
$env:PATH = $env:ChocolateyInstall + "\lib\jom\content;" + $env:PATH
|
$env:PATH = $env:ChocolateyInstall + "\lib\jom\content;" + $env:PATH
|
||||||
|
$env:PATH = "C:\Program Files (x86)\cmake\bin;" + $env:PATH
|
||||||
|
$env:PATH = "C:\Program Files (x86)\ctest\bin;" + $env:PATH
|
||||||
|
|
||||||
}
|
}
|
||||||
# -------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -159,42 +184,40 @@ install:
|
|||||||
{
|
{
|
||||||
if ($env:platform -eq "Win32")
|
if ($env:platform -eq "Win32")
|
||||||
{
|
{
|
||||||
if (Test-Path "C:\OpenSSL-Win32") {
|
$openssl = $env:OPENSSL32
|
||||||
echo "using C:\OpenSSL-Win32 from cache"
|
$opensslexe = $env:OPENSSL32EXE
|
||||||
} else {
|
|
||||||
echo "downloading OpenSSL-Win32"
|
|
||||||
Start-FileDownload 'http://slproweb.com/download/Win32OpenSSL-1_0_2e.exe'
|
|
||||||
echo "installing C:\OpenSSL-Win32"
|
|
||||||
Start-Process "Win32OpenSSL-1_0_2e.exe" -Args "/silent /verysilent /sp- /suppressmsgboxes" -Wait
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if ($env:platform -eq "x64")
|
if ($env:platform -eq "x64")
|
||||||
{
|
{
|
||||||
if (Test-Path "C:\OpenSSL-Win64") {
|
$openssl = $env:OPENSSL64
|
||||||
echo "using C:\OpenSSL-Win64 from cache"
|
$opensslexe = $env:OPENSSL64EXE
|
||||||
} else {
|
|
||||||
echo "downloading OpenSSL-Win64"
|
|
||||||
Start-FileDownload 'http://slproweb.com/download/Win64OpenSSL-1_0_2e.exe'
|
|
||||||
echo "installing C:\OpenSSL-Win64"
|
|
||||||
Start-Process "Win64OpenSSL-1_0_2e.exe" -Args "/silent /verysilent /sp- /suppressmsgboxes" -Wait
|
|
||||||
}
|
}
|
||||||
|
$opensslurl = $env:OPENSSLURL + "/" + $opensslexe
|
||||||
|
|
||||||
|
if (Test-Path $openssl) {
|
||||||
|
Write-Host "using $openssl from cache" -ForegroundColor Yellow
|
||||||
|
} else {
|
||||||
|
Write-Host "downloading $openssl" -ForegroundColor Cyan
|
||||||
|
Start-FileDownload $opensslurl
|
||||||
|
Write-Host "installing $openssl" -ForegroundColor Green
|
||||||
|
Start-Process $opensslexe -Args "/silent /verysilent /sp- /suppressmsgboxes" -Wait
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# -------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------
|
||||||
# MySQL 32 bit is not available by default on AppVeyor
|
# MySQL 32 bit is not available by default on AppVeyor
|
||||||
# -------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------
|
||||||
- ps: |
|
- ps: |
|
||||||
if (($env:platform -eq "Win32") -and !($env:builder -eq "cygwin"))
|
if ($env:platform -eq "Win32")
|
||||||
{
|
{
|
||||||
if (Test-Path $env:MYSQL32) {
|
if (Test-Path $env:MYSQL32) {
|
||||||
echo "using $env:MYSQL32 from cache"
|
Write-Host "using $env:MYSQL32 from cache" -ForegroundColor Yellow
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo "downloading $env:MYSQL32"
|
Write-Host "downloading $env:MYSQL32" -ForegroundColor Cyan
|
||||||
Invoke-WebRequest "http://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.17-win32.zip" -OutFile mysql-5.7.17-win32.zip
|
Invoke-WebRequest $env:MYSQL32URL -OutFile $env:MYSQL32ZIP
|
||||||
echo "installing $env:MYSQL32"
|
Write-Host "installing $env:MYSQL32" -ForegroundColor Green
|
||||||
7z x -y mysql-5.7.17-win32.zip -oc:\
|
7z x -y $env:MYSQL32ZIP -oc:\
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# -------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------
|
||||||
@@ -204,10 +227,10 @@ install:
|
|||||||
# http://www.enterprisedb.com/products-services-training/pgdownload#windows
|
# http://www.enterprisedb.com/products-services-training/pgdownload#windows
|
||||||
# -------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------
|
||||||
- ps: |
|
- ps: |
|
||||||
if (($env:platform -eq "Win32") -and !($env:builder -eq "cygwin"))
|
if ($env:platform -eq "Win32")
|
||||||
{
|
{
|
||||||
if (Test-Path $env:POSTGRES32) {
|
if (Test-Path $env:POSTGRES32) {
|
||||||
echo "using $env:POSTGRES32 from cache"
|
Write-Host "using $env:POSTGRES32 from cache" -ForegroundColor Yellow
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -221,7 +244,6 @@ install:
|
|||||||
Write-Host "Setting up services..."
|
Write-Host "Setting up services..."
|
||||||
Stop-Service postgresql-9.4
|
Stop-Service postgresql-9.4
|
||||||
Set-Service -Name postgresql-9.4 -StartupType Manual
|
Set-Service -Name postgresql-9.4 -StartupType Manual
|
||||||
|
|
||||||
Write-Host "$env:POSTGRES32 installed" -ForegroundColor Green
|
Write-Host "$env:POSTGRES32 installed" -ForegroundColor Green
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -229,6 +251,7 @@ install:
|
|||||||
|
|
||||||
|
|
||||||
before_build:
|
before_build:
|
||||||
|
- set
|
||||||
- ps: |
|
- ps: |
|
||||||
if ($env:builder -eq "cmake")
|
if ($env:builder -eq "cmake")
|
||||||
{
|
{
|
||||||
@@ -250,6 +273,12 @@ before_build:
|
|||||||
if($env:platform -eq 'Win32') { $vctool='';}
|
if($env:platform -eq 'Win32') { $vctool='';}
|
||||||
if($env:platform -eq 'x64') { $vctool='x86_amd64';$vspath+='\'+$vctool }
|
if($env:platform -eq 'x64') { $vctool='x86_amd64';$vspath+='\'+$vctool }
|
||||||
}
|
}
|
||||||
|
if ($env:vsver -eq "150")
|
||||||
|
{
|
||||||
|
$vspath= convert-path $env:VS150COMNTOOLS\..\..\VC\bin; $yyyy='2017'
|
||||||
|
if($env:platform -eq 'Win32') { $vctool='';}
|
||||||
|
if($env:platform -eq 'x64') { $vctool='x86_amd64';$vspath+='\'+$vctool }
|
||||||
|
}
|
||||||
pushd $vspath;
|
pushd $vspath;
|
||||||
$tool= if($vctool -eq '') {'32'} else {$vctool}
|
$tool= if($vctool -eq '') {'32'} else {$vctool}
|
||||||
cmd /c "vcvars$tool.bat&set" |
|
cmd /c "vcvars$tool.bat&set" |
|
||||||
@@ -268,8 +297,6 @@ before_build:
|
|||||||
# & C:\cygwin\bin\ls -lR $env:MYSQL64
|
# & C:\cygwin\bin\ls -lR $env:MYSQL64
|
||||||
# -------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------
|
||||||
- ps: |
|
- ps: |
|
||||||
if (!($env:builder -eq "cygwin"))
|
|
||||||
{
|
|
||||||
if ($env:platform -eq "Win32")
|
if ($env:platform -eq "Win32")
|
||||||
{
|
{
|
||||||
$env:INCLUDE = $env:MYSQL32 + "\include;" + $env:INCLUDE
|
$env:INCLUDE = $env:MYSQL32 + "\include;" + $env:INCLUDE
|
||||||
@@ -295,15 +322,12 @@ before_build:
|
|||||||
$env:MYSQL_PWD="Password12!"
|
$env:MYSQL_PWD="Password12!"
|
||||||
$cmd = 'mysql -e "create database pocotestdb;" --user=root';
|
$cmd = 'mysql -e "create database pocotestdb;" --user=root';
|
||||||
iex "& $cmd"
|
iex "& $cmd"
|
||||||
}
|
|
||||||
# -------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
# -------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------
|
||||||
# PostgreSQL
|
# PostgreSQL
|
||||||
# -------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------
|
||||||
- ps: |
|
- ps: |
|
||||||
if (!($env:builder -eq "cygwin"))
|
|
||||||
{
|
|
||||||
if ($env:platform -eq "Win32")
|
if ($env:platform -eq "Win32")
|
||||||
{
|
{
|
||||||
$env:INCLUDE = $env:POSTGRES32 + "\include;" + $env:INCLUDE
|
$env:INCLUDE = $env:POSTGRES32 + "\include;" + $env:INCLUDE
|
||||||
@@ -316,7 +340,6 @@ before_build:
|
|||||||
$env:LIB = $env:POSTGRES64 + "\lib;" + $env:LIB
|
$env:LIB = $env:POSTGRES64 + "\lib;" + $env:LIB
|
||||||
$env:PATH = $env:POSTGRES64 + "\bin;" + $env:PATH
|
$env:PATH = $env:POSTGRES64 + "\bin;" + $env:PATH
|
||||||
}
|
}
|
||||||
}
|
|
||||||
# -------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
after_build:
|
after_build:
|
||||||
@@ -367,6 +390,8 @@ build_script:
|
|||||||
# + FullyQualifiedErrorId : NativeCommandError
|
# + FullyQualifiedErrorId : NativeCommandError
|
||||||
#
|
#
|
||||||
# Command executed with exception: MC: Compiling C:/projects/poco/Foundation/src/pocomsg.mc
|
# Command executed with exception: MC: Compiling C:/projects/poco/Foundation/src/pocomsg.mc
|
||||||
|
# -------------------------------------------------------------------------------------------
|
||||||
|
# Don't build Cygwin64 with std=c++14 until this issue be fixed https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77441
|
||||||
# -------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------
|
||||||
- ps: |
|
- ps: |
|
||||||
if ($env:builder -eq "cygwin")
|
if ($env:builder -eq "cygwin")
|
||||||
@@ -398,15 +423,15 @@ build_script:
|
|||||||
mkdir cmake-build | out-null;pushd cmake-build;
|
mkdir cmake-build | out-null;pushd cmake-build;
|
||||||
if ($env:platform -eq "Win32")
|
if ($env:platform -eq "Win32")
|
||||||
{
|
{
|
||||||
$opensslrootdir = 'C:\OpenSSL-Win32'
|
$openssl = $env:OPENSSL32
|
||||||
}
|
}
|
||||||
if ($env:platform -eq "x64")
|
if ($env:platform -eq "x64")
|
||||||
{
|
{
|
||||||
$opensslrootdir = 'C:\OpenSSL-Win64'
|
$openssl = $env:OPENSSL64
|
||||||
}
|
}
|
||||||
$defs =' -G"NMake Makefiles"';
|
$defs =' -G"NMake Makefiles"';
|
||||||
$defs+=" -DCMAKE_BUILD_TYPE=$env:configuration";
|
$defs+=" -DCMAKE_BUILD_TYPE=$env:configuration";
|
||||||
$defs+=" -DOPENSSL_ROOT_DIR=$opensslrootdir";
|
$defs+=" -DOPENSSL_ROOT_DIR=$openssl";
|
||||||
$defs+=" -DENABLE_NETSSL=OFF";
|
$defs+=" -DENABLE_NETSSL=OFF";
|
||||||
$defs+=" -DENABLE_NETSSL_WIN=ON";
|
$defs+=" -DENABLE_NETSSL_WIN=ON";
|
||||||
$defs+=" -DENABLE_DATA_MYSQL=OFF";
|
$defs+=" -DENABLE_DATA_MYSQL=OFF";
|
||||||
@@ -540,7 +565,7 @@ test_script:
|
|||||||
Write-Host -ForegroundColor Yellow $line;
|
Write-Host -ForegroundColor Yellow $line;
|
||||||
|
|
||||||
Write-Host -ForegroundColor Yellow 'ctest -VV -E Data*'
|
Write-Host -ForegroundColor Yellow 'ctest -VV -E Data*'
|
||||||
ctest -VV -E Data*
|
ctest -VV -E Data* -E Crypto*
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
Write-Host $runs' runs, ' $fails' fails'
|
Write-Host $runs' runs, ' $fails' fails'
|
||||||
|
|||||||
@@ -79,3 +79,21 @@ SYSFLAGS = -D_XOPEN_SOURCE=500
|
|||||||
# System Specific Libraries
|
# System Specific Libraries
|
||||||
#
|
#
|
||||||
SYSLIBS =
|
SYSLIBS =
|
||||||
|
|
||||||
|
#
|
||||||
|
# Auto-detect architecture if not specified
|
||||||
|
#
|
||||||
|
ifndef OSARCH_64BITS
|
||||||
|
LBITS := $(shell getconf LONG_BIT)
|
||||||
|
ifeq ($(LBITS),64)
|
||||||
|
OSARCH_64BITS = 1
|
||||||
|
else
|
||||||
|
OSARCH_64BITS = 0
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
#
|
||||||
|
# C++11/14 detection
|
||||||
|
#
|
||||||
|
include $(POCO_BASE)/build/script/cpp11-gcc
|
||||||
|
|
||||||
|
|||||||
84
build/config/Cygwin-clang
Normal file
84
build/config/Cygwin-clang
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# Cygwin
|
||||||
|
#
|
||||||
|
# Make settings for Cygwin on WinXP/gcc 3.4
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# General Settings, note that strip doesn't do anything on Cygwin, thus empty
|
||||||
|
#
|
||||||
|
LINKMODE ?= SHARED
|
||||||
|
|
||||||
|
#
|
||||||
|
# Define Tools
|
||||||
|
#
|
||||||
|
CC = clang$(CLANG_VERSION)
|
||||||
|
CXX = clang++$(CLANG_VERSION)
|
||||||
|
LINK = $(CXX)
|
||||||
|
LIB = ar -cr
|
||||||
|
RANLIB = ranlib
|
||||||
|
SHLIB = $(CXX) -shared -o $@
|
||||||
|
SHLIBLN = $(POCO_BASE)/build/script/shlibln
|
||||||
|
STRIP =
|
||||||
|
DEP = $(POCO_BASE)/build/script/makedepend.gcc
|
||||||
|
SHELL = sh
|
||||||
|
RM = rm -rf
|
||||||
|
CP = cp
|
||||||
|
MKDIR = mkdir -p
|
||||||
|
|
||||||
|
#
|
||||||
|
# Extension for Shared Libraries
|
||||||
|
#
|
||||||
|
LIBPREFIX = cyg
|
||||||
|
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
|
||||||
|
CXXFLAGS32 =
|
||||||
|
CXXFLAGS64 =
|
||||||
|
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 =
|
||||||
|
SHAREDOPT_LINK =
|
||||||
|
DEBUGOPT_CC = -g -D_DEBUG
|
||||||
|
DEBUGOPT_CXX = -g -D_DEBUG
|
||||||
|
DEBUGOPT_LINK = -g
|
||||||
|
RELEASEOPT_CC = -DNDEBUG
|
||||||
|
RELEASEOPT_CXX = -DNDEBUG
|
||||||
|
RELEASEOPT_LINK =
|
||||||
|
|
||||||
|
#
|
||||||
|
# System Specific Flags
|
||||||
|
#
|
||||||
|
SYSFLAGS = -D_XOPEN_SOURCE=500 -D__BSD_VISIBLE
|
||||||
|
|
||||||
|
#
|
||||||
|
# System Specific Libraries
|
||||||
|
#
|
||||||
|
SYSLIBS =
|
||||||
|
|
||||||
|
#
|
||||||
|
# C++11/14 detection
|
||||||
|
#
|
||||||
|
include $(POCO_BASE)/build/script/cpp11-clang
|
||||||
@@ -63,7 +63,7 @@ LINKFLAGS32 =
|
|||||||
LINKFLAGS64 =
|
LINKFLAGS64 =
|
||||||
STATICOPT_CC =
|
STATICOPT_CC =
|
||||||
STATICOPT_CXX =
|
STATICOPT_CXX =
|
||||||
STATICOPT_LINK = -static
|
STATICOPT_LINK =
|
||||||
SHAREDOPT_CC = -fPIC
|
SHAREDOPT_CC = -fPIC
|
||||||
SHAREDOPT_CXX = -fPIC
|
SHAREDOPT_CXX = -fPIC
|
||||||
SHAREDOPT_LINK = -Wl,-rpath,$(LIBPATH)
|
SHAREDOPT_LINK = -Wl,-rpath,$(LIBPATH)
|
||||||
@@ -82,7 +82,7 @@ SYSFLAGS = -D_XOPEN_SOURCE=600 -D_REENTRANT -D_THREAD_SAFE -D_FILE_OFFSET_BITS=6
|
|||||||
#
|
#
|
||||||
# System Specific Libraries
|
# System Specific Libraries
|
||||||
#
|
#
|
||||||
SYSLIBS = -lpthread -ldl -lrt
|
SYSLIBS = -lrt -lpthread -ldl
|
||||||
|
|
||||||
#
|
#
|
||||||
# Auto-detect architecture if not specified
|
# Auto-detect architecture if not specified
|
||||||
@@ -95,3 +95,8 @@ ifndef OSARCH_64BITS
|
|||||||
OSARCH_64BITS = 0
|
OSARCH_64BITS = 0
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
#
|
||||||
|
# C++11/14 detection
|
||||||
|
#
|
||||||
|
include $(POCO_BASE)/build/script/cpp11-gcc
|
||||||
|
|||||||
@@ -69,3 +69,8 @@ SYSFLAGS = -D_XOPEN_SOURCE=500 -D_REENTRANT -D_THREAD_SAFE -D_FILE_OFFSET_BITS=6
|
|||||||
# System Specific Libraries
|
# System Specific Libraries
|
||||||
#
|
#
|
||||||
SYSLIBS = -lpthread -ldl -lrt
|
SYSLIBS = -lpthread -ldl -lrt
|
||||||
|
|
||||||
|
#
|
||||||
|
# C++11/14 detection
|
||||||
|
#
|
||||||
|
include $(POCO_BASE)/build/script/cpp11-clang
|
||||||
|
|||||||
18
build/script/cpp11-appleclang
Normal file
18
build/script/cpp11-appleclang
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
#
|
||||||
|
# $Id: //poco/1.4/build/script/cpp11-appleclang#1 $
|
||||||
|
#
|
||||||
|
# cpp11-appleclang
|
||||||
|
#
|
||||||
|
# Detect compatible AppleClang version and add c++11/14 flags
|
||||||
|
#
|
||||||
|
|
||||||
|
CLANGVERSION := $(shell $(CXX) -E -dM - < /dev/null | grep __apple_build_version__ | sed -e 's/^.* //g')
|
||||||
|
|
||||||
|
# C++14 needs AppleClang 500.x
|
||||||
|
ifeq ($(shell test $(CLANGVERSION) -ge 5000275 && echo 1), 1)
|
||||||
|
CXXFLAGS += -std=c++1y
|
||||||
|
# C++11 needs AppleClang 503.x
|
||||||
|
else ifeq ($(shell test $(CLANGVERSION) -ge 5030038 && echo 1), 1)
|
||||||
|
CXXFLAGS += -std=c++0x
|
||||||
|
endif
|
||||||
26
build/script/cpp11-clang
Normal file
26
build/script/cpp11-clang
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
#
|
||||||
|
# $Id: //poco/1.4/build/script/cpp11-clang#1 $
|
||||||
|
#
|
||||||
|
# cpp11-clang
|
||||||
|
#
|
||||||
|
# Detect compatible Clang version and add c++11/14 flags
|
||||||
|
#
|
||||||
|
|
||||||
|
CLANGMAJOR := $(shell $(CXX) -x c++ /dev/null -dM -E | grep __clang_major__ | sed -e 's/^.* //g')
|
||||||
|
CLANGMINOR := $(shell $(CXX) -x c++ /dev/null -dM -E | grep __clang_minor__ | sed -e 's/^.* //g')
|
||||||
|
CLANGPATCH := $(shell $(CXX) -x c++ /dev/null -dM -E | grep __clang_patchlevel__ | sed -e 's/^.* //g')
|
||||||
|
CLANGVERSION := $(CLANGMAJOR)$(CLANGMINOR)$(CLANGPATCH)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Clang 3.4 doesn't accept -std=c++14, only -std=c++1y.
|
||||||
|
#
|
||||||
|
|
||||||
|
# C++14 needs Clang 3.4
|
||||||
|
ifeq ($(shell test $(CLANGVERSION) -ge 340 && echo 1), 1)
|
||||||
|
CXXFLAGS += -std=c++1y
|
||||||
|
# C++11 needs Clang 3.3
|
||||||
|
else ifeq ($(shell test $(CLANGVERSION) -ge 330 && echo 1), 1)
|
||||||
|
CXXFLAGS += -std=c++0x
|
||||||
|
endif
|
||||||
|
|
||||||
42
build/script/cpp11-gcc
Normal file
42
build/script/cpp11-gcc
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
#
|
||||||
|
# $Id: //poco/1.4/build/script/cpp11-gcc#1 $
|
||||||
|
#
|
||||||
|
# cpp11-gcc
|
||||||
|
#
|
||||||
|
# Detect compatible GCC version and add c++11/14 flags
|
||||||
|
#
|
||||||
|
# From the online doc
|
||||||
|
# __GNUC__
|
||||||
|
# __GNUC_MINOR__
|
||||||
|
# __GNUC_PATCHLEVEL__
|
||||||
|
# These macros are defined by all GNU compilers that use the C preprocessor: C, C++, Objective-C and Fortran.
|
||||||
|
# Their values are the major version, minor version, and patch level of the compiler, as integer constants.
|
||||||
|
# For example, GCC 3.2.1 will define __GNUC__ to 3, __GNUC_MINOR__ to 2, and __GNUC_PATCHLEVEL__ to 1. i
|
||||||
|
# These macros are also defined if you invoke the preprocessor directly.
|
||||||
|
#
|
||||||
|
# __VERSION__
|
||||||
|
# This macro expands to a string constant which describes the version of the compiler in use.
|
||||||
|
# You should not rely on its contents having any particular form, but it can be counted on to contain
|
||||||
|
# at least the release number.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
GNUMAJOR := $(shell $(CXX) -E -dM - < /dev/null | grep __GNUC__ | sed -e 's/^.* //g')
|
||||||
|
GNUMINOR := $(shell $(CXX) -E -dM - < /dev/null | grep __GNUC_MINOR__ | sed -e 's/^.* //g')
|
||||||
|
GNUPATCH := $(shell $(CXX) -E -dM - < /dev/null | grep __GNUC_PATCHLEVEL__ | sed -e 's/^.* //g')
|
||||||
|
GCCVERSION := $(GNUMAJOR)$(GNUMINOR)$(GNUPATCH)
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# GCC 4.8 (or 4.6?) doesn't accept -std=c++11, only -std=c++0x.
|
||||||
|
#
|
||||||
|
# C++14 needs GCC 4.9.2
|
||||||
|
ifeq ($(shell test $(GCCVERSION) -ge 492 && echo 1), 1)
|
||||||
|
CXXFLAGS += -std=c++14
|
||||||
|
# C++11 needs GCC 4.8.1
|
||||||
|
else ifeq ($(shell test $(GCCVERSION) -ge 481 && echo 1), 1)
|
||||||
|
CXXFLAGS += -std=c++11
|
||||||
|
else
|
||||||
|
CXXFLAGS += -std=c++03
|
||||||
|
endif
|
||||||
61
cmake/CXX11.cmake
Normal file
61
cmake/CXX11.cmake
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
# Copyright (c) 2013 Nathan Osman
|
||||||
|
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
# in the Software without restriction, including without limitation the rights
|
||||||
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
# The above copyright notice and this permission notice shall be included in
|
||||||
|
# all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
# THE SOFTWARE.
|
||||||
|
|
||||||
|
# Determines whether or not the compiler supports C++11
|
||||||
|
macro(check_for_cxx11_compiler _VAR)
|
||||||
|
message(STATUS "Checking for C++11 compiler")
|
||||||
|
set(${_VAR})
|
||||||
|
if((MSVC AND (MSVC10 OR MSVC11 OR MSVC12 OR MSVC14)) OR
|
||||||
|
(CMAKE_COMPILER_IS_GNUCXX AND NOT ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 4.6) OR
|
||||||
|
(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 3.1) OR
|
||||||
|
(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"))
|
||||||
|
set(${_VAR} 1)
|
||||||
|
message(STATUS "Checking for C++11 compiler - available")
|
||||||
|
else()
|
||||||
|
message(STATUS "Checking for C++11 compiler - unavailable")
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
# Sets the appropriate flag to enable C++11 support
|
||||||
|
macro(enable_cxx11)
|
||||||
|
set (CMAKE_CXX_STANDARD 11)
|
||||||
|
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
# Determines whether or not the compiler supports C++11
|
||||||
|
macro(check_for_cxx14_compiler _VAR)
|
||||||
|
message(STATUS "Checking for C++14 compiler")
|
||||||
|
set(${_VAR})
|
||||||
|
if((MSVC AND (MSVC14)) OR
|
||||||
|
(CMAKE_COMPILER_IS_GNUCXX AND NOT ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 4.7) OR
|
||||||
|
(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 3.4) OR
|
||||||
|
(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"))
|
||||||
|
set(${_VAR} 1)
|
||||||
|
message(STATUS "Checking for C++14 compiler - available")
|
||||||
|
else()
|
||||||
|
message(STATUS "Checking for C++14 compiler - unavailable")
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
# Sets the appropriate flag to enable C++14 support
|
||||||
|
macro(enable_cxx14)
|
||||||
|
set (CMAKE_CXX_STANDARD 14)
|
||||||
|
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
endmacro()
|
||||||
@@ -119,9 +119,11 @@ done
|
|||||||
|
|
||||||
: ${CC:=gcc}
|
: ${CC:=gcc}
|
||||||
: ${CXX:=g++}
|
: ${CXX:=g++}
|
||||||
|
: ${CXXFLAGS:=-std=c++11}
|
||||||
|
|
||||||
echo "CC=$CC" >>$build/PocoDoc.ini
|
echo "CC=$CC" >>$build/PocoDoc.ini
|
||||||
echo "CXX=$CXX" >>$build/PocoDoc.ini
|
echo "CXX=$CXX" >>$build/PocoDoc.ini
|
||||||
|
echo "CXXFLAGS=$CXXFLAGS" >>$build/PocoDoc.ini
|
||||||
echo "PocoBuild=$build" >>$build/PocoDoc.ini
|
echo "PocoBuild=$build" >>$build/PocoDoc.ini
|
||||||
echo "PocoBase=$POCO_BASE" >>$build/PocoDoc.ini
|
echo "PocoBase=$POCO_BASE" >>$build/PocoDoc.ini
|
||||||
echo "PocoDoc.output=$docPath" >>$build/PocoDoc.ini
|
echo "PocoDoc.output=$docPath" >>$build/PocoDoc.ini
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ mkdir -p ${target}/build/vxconfig
|
|||||||
cp ${POCO_BASE}/build/config/* ${target}/build/config
|
cp ${POCO_BASE}/build/config/* ${target}/build/config
|
||||||
cp ${POCO_BASE}/build/rules/* ${target}/build/rules
|
cp ${POCO_BASE}/build/rules/* ${target}/build/rules
|
||||||
cp ${POCO_BASE}/build/vxconfig/* ${target}/build/vxconfig
|
cp ${POCO_BASE}/build/vxconfig/* ${target}/build/vxconfig
|
||||||
|
cp ${POCO_BASE}/build/script/cpp11-* ${target}/build/script
|
||||||
cp ${POCO_BASE}/build/script/makedepend.* ${target}/build/script
|
cp ${POCO_BASE}/build/script/makedepend.* ${target}/build/script
|
||||||
cp ${POCO_BASE}/build/script/makeldpath ${target}/build/script
|
cp ${POCO_BASE}/build/script/makeldpath ${target}/build/script
|
||||||
cp ${POCO_BASE}/build/script/shlibln ${target}/build/script
|
cp ${POCO_BASE}/build/script/shlibln ${target}/build/script
|
||||||
|
|||||||
Reference in New Issue
Block a user