Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CMakes #250

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ environment:
TESTS_ONLY: true
- COMPILER: MSVC_14
ARCHITECTURE: x64
BUILD_EXAMPLES: true
BUILD_BENCHMARKS: true
RTTR_BUILD_EXAMPLES: true
RTTR_BUILD_BENCHMARKS: true
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
# uncheck this in order to build and upload the documentation
# uncheck this in order to build and upload the documentation
#- COMPILER: MSVC_14
# ARCHITECTURE: x64
# BUILD_DOCU: true
# RTTR_BUILD_DOCU: true
# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015

build:
Expand All @@ -85,12 +85,12 @@ install:
- 7z x ninja.zip -oC:\projects\deps\ninja > nul
- set PATH=C:\projects\deps\ninja;%PATH%
- ninja --version

#######################################################################################
# Install doxygen
#######################################################################################
- ps: >-
If ($env:BUILD_DOCU -Match "true") {
If ($env:RTTR_BUILD_DOCU -Match "true") {
$env:DOXYGEN_URL="http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.10.windows.bin.zip"
appveyor DownloadFile $env:DOXYGEN_URL -FileName doxygen.zip
7z x doxygen.zip -oC:/projects/deps/doxygen-1.8.10 > $null
Expand All @@ -102,7 +102,7 @@ install:
# CMake
#######################################################################################
- cmake --version

#######################################################################################
# setup boost
#######################################################################################
Expand All @@ -120,17 +120,17 @@ before_build:
- IF "%ARCHITECTURE%" == "x86" IF "%COMPILER%" == "MINGW_482" set PATH=C:\Qt\Tools\mingw482_32\bin;%PATH%
- IF "%ARCHITECTURE%" == "x86" IF "%COMPILER%" == "MINGW_492" set PATH=C:\Qt\Tools\mingw492_32\bin;%PATH%
- IF "%ARCHITECTURE%" == "x64" IF "%COMPILER%" == "MINGW_W64" set PATH=C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH%
- IF "%BUILD_DOCU%" == "true" choco install lftp --version 4.7.5
- IF "%RTTR_BUILD_DOCU%" == "true" choco install lftp --version 4.7.5

#######################################################################################
# we can use Ninja for all configurations
#######################################################################################
build_script:
- mkdir build
- cd build
- cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=%BUILD_EXAMPLES% -DBUILD_BENCHMARKS=%BUILD_BENCHMARKS% -DBUILD_WEBSITE_DOCU=%BUILD_DOCU%
- cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DRTTR_BUILD_EXAMPLES=%RTTR_BUILD_EXAMPLES% -DRTTR_BUILD_BENCHMARKS=%RTTR_BUILD_BENCHMARKS% -DRTTR_BUILD_WEBSITE_DOCU=%RTTR_BUILD_DOCU%
- if "%TESTS_ONLY%" == "true" (ninja run_tests)
- if "%BUILD_EXAMPLES%" == "true" (ninja examples)
- if "%BUILD_BENCHMARKS%" == "true" (ninja bench_method && ninja bench_rttr_cast && ninja bench_variant)
- if "%RTTR_BUILD_EXAMPLES%" == "true" (ninja examples)
- if "%RTTR_BUILD_BENCHMARKS%" == "true" (ninja bench_method && ninja bench_rttr_cast && ninja bench_variant)
# when APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH is empty, we knew, we are on master branch
- if "%BUILD_DOCU%" == "true" ( if "%APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH%" == "" (ninja doc_website && echo "Upload documentation..." && lftp -c "set ssl:verify-certificate no; open -u %FTP_USER%,%FTP_PASSWORD% ftp://server3.febas.net:21/; mirror -R doc_website/master doc_tmp" && lftp -c "set ssl:verify-certificate no; open -u %FTP_USER%,%FTP_PASSWORD% ftp://server3.febas.net:21/; rm -r doc" && lftp -c "set ssl:verify-certificate no; open -u %FTP_USER%,%FTP_PASSWORD% ftp://server3.febas.net:21/; mv doc_tmp doc") )
- if "%RTTR_BUILD_DOCU%" == "true" ( if "%APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH%" == "" (ninja doc_website && echo "Upload documentation..." && lftp -c "set ssl:verify-certificate no; open -u %FTP_USER%,%FTP_PASSWORD% ftp://server3.febas.net:21/; mirror -R doc_website/master doc_tmp" && lftp -c "set ssl:verify-certificate no; open -u %FTP_USER%,%FTP_PASSWORD% ftp://server3.febas.net:21/; rm -r doc" && lftp -c "set ssl:verify-certificate no; open -u %FTP_USER%,%FTP_PASSWORD% ftp://server3.febas.net:21/; mv doc_tmp doc") )
62 changes: 31 additions & 31 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,21 @@ env:
global:
- ARCH_FLAGS_x86='-m32'
- ARCH_FLAGS_x86_64=''
- BUILD_DOCU=false
- RTTR_BUILD_DOCU=false
- secure: "k1o939GwFc0AJY8cCprAeF9OYUs00Ad+ggrhzxtw4GLdjn0CYGnqrftHtkJ5WySDXj7rnEL4qur1oO19OeVGufhLQTV0+yian8meYppk7rlPIOOl6ygltTxMxNgvmkqCsHC1J1l+7vMEJUm1MunWedCnORWySoK2pZ89nAiMmzY/fjpsOKR8vpXQw5BTZPR775lYZyzbm8/ZY8eATd4EJGH+4YH/sTzYFa9SL2J/ieWR+SvALNLos7x6Civ0Nl6LXx5hXMenpSUpAbu7wBm6KDoL6vGHYa7oKrnJ5BAqOP4poNXF000riy3TENSO1sf+dGQJO8O2IQwe352VKw+paQ4s0SGe5lWAmn2hexU+dZ7rNO0LwA+bdt8XGIXZo2lvdHgsO2Ymj/wPLrqYHGwBgGceBilyD7ZAcKQ/OvHmvkHCytMSVhftcllsOZFwDen/5FliNTRI+Cs68pZUiT2PgT44t/8i5X3F1o8FlV9T+wDsPdH909g/pOFt4U3N8aGxst9bmrQvYAhVmPKtuxjz7ycBfsOTxON9HfTQFEGv3KCREdN8lzi/J9FBCFTtIwHbBKvEeaXrZ3oHSa9UoVG5VQtw14aBdzs7K2MrEYMxg4LCfSHe8ecYbRg1LM9uSdK5dcn/A9wLKEdFmU/pvbl3ryaF4KpL7w0fvNMC/k6o5tc="
- secure: "1ogFHnhUroT3nA1HxyXN5/Hoek6LcTazRPTGpYjKAge8To/x614D6R9j2yu0EDOZalolq0VeOONnHLnss6aPGeMvvHH1rvoKTDQsFjsm1fB6qLRr/qpZXs+G4mxStarxrXr5487hEkPP10fEi/PSOx8Gme6Kny+tXHxDzP04ljcZYVvxWfkb+cQBCnYupbHk4hzfKRmPYcUn6lCPyOGIzwsHQQI/LubmkiU+wQ0zcLLsTZSThk+zt6FlxYWykZGL24yrqmoXRszx8dR14cWPzvkxVeEOe3OY9mNix1Z7ki2eVeEk8m7d70yPmV5p8F2/nPGC7kUXTvPrAL62CcE5moHubijJwKXJM6nBQJYCPGygnvRnWxnoqO/9JpDuds4Cv+tbJMgo2ViLPsYk3BgMnYo4z+p4JViN9P4/jzbhsVtWd4rnXmPt9j4FkED+Eyt8BUzXFdTAPpuzwZSvmYzzR8MdZE/telCAcWUoiS35IQcWJ0UmPpNZfR1Lll0cWQ+dTmjNETJvwognuaTAexL7m0uMhX6KQIZfap2H0w+CIua7+jl6eb9iyvXv9vZZEUCH2kTWnYXqBmDGRHG3tEp97o5+yWQm1qjweLvKAMRirdkSaZEL0lrsJ8mBS6Y+PQwAQxlu+P3pFEJ6uU3fJrKyciuWnVDZKyddIrJEZorXjOA="

matrix:
include:

# check code formatting
- os: linux
compiler: gcc
env: NAME="check code formatting" CHECK_FORMATTING=true
addons:
apt:
packages: ['vera++']

# valgrind memory check
- os: linux
compiler: gcc
Expand All @@ -68,7 +68,7 @@ matrix:
- pip install --user urllib3[secure] cpp-coveralls
- coveralls -e 3rd_party -e src/benchmarks -e src/unit_tests -i src/rttr --gcov-options '\-lp' --gcov 'gcov-4.8'
env: NAME="code coverage x86" COMPILER=g++-4.8 ARCH=x86 CONF=Debug GCOV_FLAGS='--coverage' UNIT_TESTS=true

# check code coverage x64 => result https://coveralls.io/github/rttrorg/rttr
- os: linux
compiler: gcc
Expand All @@ -80,7 +80,7 @@ matrix:
- pip install --user urllib3[secure] cpp-coveralls
- coveralls -e 3rd_party -e src/benchmarks -e src/unit_tests -i src/rttr --gcov-options '\-lp' --gcov 'gcov-4.8'
env: NAME="code coverage x64" COMPILER=g++-4.8 ARCH=x86_64 CONF=Debug GCOV_FLAGS='--coverage' UNIT_TESTS=true

# build docu and upload to server
- os: linux
compiler: gcc
Expand All @@ -97,7 +97,7 @@ matrix:
lftp -c "set ssl:verify-certificate no; open -u ${FTP_USER},${FTP_PASSWORD} ftp://server3.febas.net:21/; rm -r doc"
lftp -c "set ssl:verify-certificate no; open -u ${FTP_USER},${FTP_PASSWORD} ftp://server3.febas.net:21/; mv doc_tmp doc"
fi
env: NAME="documentation build" BUILD_DOCU=true COMPILER=g++-4.8 ARCH=x86 CONF=Release UNIT_TESTS=false
env: NAME="documentation build" RTTR_BUILD_DOCU=true COMPILER=g++-4.8 ARCH=x86 CONF=Release UNIT_TESTS=false

# Linux / GCC
- os: linux
Expand All @@ -123,31 +123,31 @@ matrix:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-5', 'ninja-build']
env: NAME="g++-5" COMPILER=g++-5 ARCH=x86_64 CONF=Release UNIT_TESTS=true

- os: linux
compiler: gcc
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-5', 'libboost-all-dev', 'ninja-build']
env: NAME="g++-5 - Build benchmarks & examples" COMPILER=g++-5 ARCH=x86_64 CONF=Release UNIT_TESTS=true BUILD_EXAMPLES=true BUILD_BENCHMARKS=true
env: NAME="g++-5 - Build benchmarks & examples" COMPILER=g++-5 ARCH=x86_64 CONF=Release UNIT_TESTS=true RTTR_BUILD_EXAMPLES=true RTTR_BUILD_BENCHMARKS=true

- os: linux
compiler: gcc
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-6', 'ninja-build']
env: NAME="g++-6" COMPILER=g++-6 ARCH=x86_64 CONF=Release UNIT_TESTS=true

- os: linux
compiler: gcc
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-7', 'libboost-all-dev', 'ninja-build']
env: NAME="g++-7" COMPILER=g++-7 ARCH=x86_64 CONF=Release UNIT_TESTS=true BUILD_BENCHMARKS=true
env: NAME="g++-7" COMPILER=g++-7 ARCH=x86_64 CONF=Release UNIT_TESTS=true RTTR_BUILD_BENCHMARKS=true

# Linux / CLang
- os: linux
compiler: clang
Expand All @@ -156,39 +156,39 @@ matrix:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.7']
packages: ['libstdc++-5-dev', 'clang-3.7', 'ninja-build']
env: COMPILER=clang++-3.7 ARCH=x86_64 CONF=Release UNIT_TESTS=true

- os: linux
compiler: clang
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-4.0']
packages: ['libstdc++-6-dev', 'clang-4.0', 'libboost-all-dev', 'ninja-build']
env: NAME="clang++-4.0 - build benchmarks & examples" COMPILER=clang++-4.0 ARCH=x86_64 CONF=Release UNIT_TESTS=false BUILD_EXAMPLES=true BUILD_BENCHMARKS=true
env: NAME="clang++-4.0 - build benchmarks & examples" COMPILER=clang++-4.0 ARCH=x86_64 CONF=Release UNIT_TESTS=false RTTR_BUILD_EXAMPLES=true RTTR_BUILD_BENCHMARKS=true

- os: linux
compiler: clang
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['libstdc++-5-dev', 'clang-3.8', 'ninja-build']
env: COMPILER=clang++-3.8 ARCH=x86_64 CONF=Release UNIT_TESTS=true

- os: linux
compiler: clang
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['libstdc++-6-dev', 'clang-3.9', 'ninja-build']
env: COMPILER=clang++-3.9 ARCH=x86_64 CONF=Release UNIT_TESTS=true

- os: linux
compiler: clang
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-4.0']
packages: ['libstdc++-6-dev', 'clang-4.0', 'ninja-build']
env: COMPILER=clang++-4.0 ARCH=x86_64 CONF=Release UNIT_TESTS=true

- os: linux
compiler: clang
addons:
Expand All @@ -201,8 +201,8 @@ matrix:
- os: osx
osx_image: xcode9.2
compiler: clang
env: COMPILER=clang++ ARCH=x86 CONF=Release UNIT_TESTS=true BUILD_BENCHMARKS=true BUILD_EXAMPLES=true
env: COMPILER=clang++ ARCH=x86 CONF=Release UNIT_TESTS=true RTTR_BUILD_BENCHMARKS=true RTTR_BUILD_EXAMPLES=true

- os: osx
osx_image: xcode9.2
compiler: clang
Expand All @@ -217,15 +217,15 @@ matrix:
osx_image: xcode8.3
compiler: clang
env: COMPILER=clang++ ARCH=x86 CONF=Release UNIT_TESTS=true

- os: osx
osx_image: xcode8.3
compiler: clang
env: COMPILER=clang++ ARCH=x86_64 CONF=Release UNIT_TESTS=true

allow_failures:
- env: NAME="documentation build" BUILD_DOCU=true COMPILER=g++-4.8 ARCH=x86 CONF=Release UNIT_TESTS=false
- env: NAME="documentation build" RTTR_BUILD_DOCU=true COMPILER=g++-4.8 ARCH=x86 CONF=Release UNIT_TESTS=false

before_install:
- export CIT_ROOT=`pwd`
- cd $CIT_ROOT
Expand Down Expand Up @@ -256,12 +256,12 @@ install:
# Install recent Doxygen
#######################################################################################
- |
if [[ "${BUILD_DOCU}" == "true" ]]; then
if [[ "${RTTR_BUILD_DOCU}" == "true" ]]; then
DOXYGEN_URL="http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.10.linux.bin.tar.gz"
mkdir doxygen && travis_retry wget --quiet -O - ${DOXYGEN_URL} | tar --strip-components=1 -xz -C doxygen
export PATH=${DEPS_DIR}/doxygen/bin:${PATH}
fi

before_script:
- cd ${TRAVIS_BUILD_DIR}
- mkdir build
Expand All @@ -271,9 +271,9 @@ before_script:
-DCMAKE_CXX_COMPILER=${COMPILER}
-DCMAKE_BUILD_TYPE=${CONF}
-DCMAKE_CXX_FLAGS="$ARCH_FLAGS $CMAKE_ADDITIONAL_FLAGS $GCOV_FLAGS"
-DBUILD_WEBSITE_DOCU=$BUILD_DOCU
-DBUILD_EXAMPLES=$BUILD_EXAMPLES
-DBUILD_BENCHMARKS=$BUILD_BENCHMARKS
-DRTTR_BUILD_WEBSITE_DOCU=$RTTR_BUILD_DOCU
-DRTTR_BUILD_EXAMPLES=$RTTR_BUILD_EXAMPLES
-DRTTR_BUILD_BENCHMARKS=$RTTR_BUILD_BENCHMARKS
..)

script:
Expand All @@ -297,17 +297,17 @@ script:
(cd build && make run_tests -j2)
fi
- |
if [[ "${BUILD_DOCU}" == "true" ]]; then
if [[ "${RTTR_BUILD_DOCU}" == "true" ]]; then
# Run unit tests on two cores
(cd build && make doc_website -j2)
fi
- |
if [[ "${BUILD_BENCHMARKS}" == "true" ]]; then
if [[ "${RTTR_BUILD_BENCHMARKS}" == "true" ]]; then
# Run unit tests on two cores
(cd build && make bench_method -j2 && make bench_rttr_cast -j2 && make bench_variant -j2)
fi
- |
if [[ "${BUILD_EXAMPLES}" == "true" ]]; then
if [[ "${RTTR_BUILD_EXAMPLES}" == "true" ]]; then
# Run unit tests on two cores
(cd build && make examples)
fi
Expand Down
4 changes: 2 additions & 2 deletions CMake/3rd_party_libs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ MESSAGE(STATUS ${LIBRARY_OUTPUT_DIRECTORY})
MESSAGE(STATUS "Finding 3rd party libs...")
MESSAGE(STATUS "===========================")

if (BUILD_BENCHMARKS)
if (RTTR_BUILD_BENCHMARKS)
if (MSVC)
# there is a the moment a problem with finding multiple versions of boost,
# i.e. the static AND the static runtime version; that is not possible atm.
Expand All @@ -49,7 +49,7 @@ if (BUILD_BENCHMARKS)
endif()
endif()

if (BUILD_BENCHMARKS OR BUILD_EXAMPLES)
if (RTTR_BUILD_BENCHMARKS OR RTTR_BUILD_EXAMPLES)
find_package(Threads REQUIRED)
endif()

Expand Down
Loading