update build
This commit is contained in:
parent
5013f0e351
commit
cd9b35a753
3 changed files with 50 additions and 33 deletions
|
@ -25,7 +25,7 @@ before_build:
|
||||||
- if exist build RMDIR /S /Q build
|
- if exist build RMDIR /S /Q build
|
||||||
- if not exist build mkdir build
|
- if not exist build mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
- cmake -G "%GENERATOR%" -A %PLATFORM% -DCMAKE_BUILD_TYPE=${CONFIGURATION} ..
|
- cmake -G "%GENERATOR%" -A %PLATFORM% ..
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- cmake --build . --config %CONFIGURATION%
|
- cmake --build . --config %CONFIGURATION%
|
||||||
|
|
58
.travis.yml
58
.travis.yml
|
@ -19,7 +19,7 @@ matrix:
|
||||||
packages:
|
packages:
|
||||||
- g++-4.8
|
- g++-4.8
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=g++-4.8 CC_COMPILER=gcc-4.8 CONFIGURATION=Debug
|
- CXX_COMPILER=g++-4.8 CC_COMPILER=gcc-4.8
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: g++
|
compiler: g++
|
||||||
|
@ -30,7 +30,7 @@ matrix:
|
||||||
packages:
|
packages:
|
||||||
- g++-4.9
|
- g++-4.9
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=g++-4.9 CC_COMPILER=gcc-4.9 CONFIGURATION=Debug
|
- CXX_COMPILER=g++-4.9 CC_COMPILER=gcc-4.9
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: g++
|
compiler: g++
|
||||||
|
@ -41,7 +41,7 @@ matrix:
|
||||||
packages:
|
packages:
|
||||||
- g++-5
|
- g++-5
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=g++-5 CC_COMPILER=gcc-5 CONFIGURATION=Debug
|
- CXX_COMPILER=g++-5 CC_COMPILER=gcc-5
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: g++
|
compiler: g++
|
||||||
|
@ -52,7 +52,7 @@ matrix:
|
||||||
packages:
|
packages:
|
||||||
- g++-6
|
- g++-6
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=g++-6 CC_COMPILER=gcc-6 CONFIGURATION=Debug
|
- CXX_COMPILER=g++-6 CC_COMPILER=gcc-6
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: g++
|
compiler: g++
|
||||||
|
@ -63,7 +63,7 @@ matrix:
|
||||||
packages:
|
packages:
|
||||||
- g++-7
|
- g++-7
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=g++-7 CC_COMPILER=gcc-7 CONFIGURATION=Debug
|
- CXX_COMPILER=g++-7 CC_COMPILER=gcc-7
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: g++
|
compiler: g++
|
||||||
|
@ -74,7 +74,7 @@ matrix:
|
||||||
packages:
|
packages:
|
||||||
- g++-8
|
- g++-8
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=g++-8 CC_COMPILER=gcc-8 CONFIGURATION=Debug
|
- CXX_COMPILER=g++-8 CC_COMPILER=gcc-8
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
|
@ -86,7 +86,7 @@ matrix:
|
||||||
packages:
|
packages:
|
||||||
- clang-3.6
|
- clang-3.6
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=clang++-3.6 CC_COMPILER=clang-3.6 CONFIGURATION=Debug
|
- CXX_COMPILER=clang++-3.6 CC_COMPILER=clang-3.6
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
|
@ -98,7 +98,7 @@ matrix:
|
||||||
packages:
|
packages:
|
||||||
- clang-3.7
|
- clang-3.7
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=clang++-3.7 CC_COMPILER=clang-3.7 CONFIGURATION=Debug
|
- CXX_COMPILER=clang++-3.7 CC_COMPILER=clang-3.7
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
|
@ -110,7 +110,7 @@ matrix:
|
||||||
packages:
|
packages:
|
||||||
- clang-3.8
|
- clang-3.8
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=clang++-3.8 CC_COMPILER=clang-3.8 CONFIGURATION=Debug
|
- CXX_COMPILER=clang++-3.8 CC_COMPILER=clang-3.8
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
|
@ -122,7 +122,7 @@ matrix:
|
||||||
packages:
|
packages:
|
||||||
- clang-3.9
|
- clang-3.9
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=clang++-3.9 CC_COMPILER=clang-3.9 CONFIGURATION=Debug
|
- CXX_COMPILER=clang++-3.9 CC_COMPILER=clang-3.9
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
|
@ -134,7 +134,7 @@ matrix:
|
||||||
packages:
|
packages:
|
||||||
- clang-4.0
|
- clang-4.0
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=clang++-4.0 CC_COMPILER=clang-4.0 CONFIGURATION=Debug
|
- CXX_COMPILER=clang++-4.0 CC_COMPILER=clang-4.0
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
|
@ -146,7 +146,7 @@ matrix:
|
||||||
packages:
|
packages:
|
||||||
- clang-5.0
|
- clang-5.0
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=clang++-5.0 CC_COMPILER=clang-5.0 CONFIGURATION=Debug
|
- CXX_COMPILER=clang++-5.0 CC_COMPILER=clang-5.0
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
|
@ -158,85 +158,85 @@ matrix:
|
||||||
packages:
|
packages:
|
||||||
- clang-6.0
|
- clang-6.0
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=clang++-6.0 CC_COMPILER=clang-6.0 CONFIGURATION=Debug
|
- CXX_COMPILER=clang++-6.0 CC_COMPILER=clang-6.0
|
||||||
|
|
||||||
- os: osx
|
- os: osx
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
osx_image: xcode7.0
|
osx_image: xcode7.0
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||||
|
|
||||||
- os: osx
|
- os: osx
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
osx_image: xcode7.1
|
osx_image: xcode7.1
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||||
|
|
||||||
- os: osx
|
- os: osx
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
osx_image: xcode7.2
|
osx_image: xcode7.2
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||||
|
|
||||||
- os: osx
|
- os: osx
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
osx_image: xcode7.3
|
osx_image: xcode7.3
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||||
|
|
||||||
- os: osx
|
- os: osx
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
osx_image: xcode8.0
|
osx_image: xcode8.0
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||||
|
|
||||||
- os: osx
|
- os: osx
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
osx_image: xcode8.1
|
osx_image: xcode8.1
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||||
|
|
||||||
- os: osx
|
- os: osx
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
osx_image: xcode8.2
|
osx_image: xcode8.2
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||||
|
|
||||||
- os: osx
|
- os: osx
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
osx_image: xcode8.3
|
osx_image: xcode8.3
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||||
|
|
||||||
- os: osx
|
- os: osx
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
osx_image: xcode9.0
|
osx_image: xcode9.0
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||||
|
|
||||||
- os: osx
|
- os: osx
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
osx_image: xcode9.1
|
osx_image: xcode9.1
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||||
|
|
||||||
- os: osx
|
- os: osx
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
osx_image: xcode9.2
|
osx_image: xcode9.2
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||||
|
|
||||||
- os: osx
|
- os: osx
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
osx_image: xcode9.3
|
osx_image: xcode9.3
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||||
|
|
||||||
- os: osx
|
- os: osx
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
osx_image: xcode9.4
|
osx_image: xcode9.4
|
||||||
env:
|
env:
|
||||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- export CC=${CC_COMPILER}
|
- export CC=${CC_COMPILER}
|
||||||
|
@ -274,11 +274,11 @@ before_script:
|
||||||
- rm -rf build
|
- rm -rf build
|
||||||
- mkdir -p build
|
- mkdir -p build
|
||||||
- cd build
|
- cd build
|
||||||
- cmake -DCMAKE_BUILD_TYPE=${CONFIGURATION} ..
|
- cmake -G "Unix Makefiles" ..
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- cmake --build . --config ${CONFIGURATION} -- -j${JOBS}
|
- cmake --build . -- -j${JOBS}
|
||||||
- ctest --output-on-failure -С ${CONFIGURATION} -j${JOBS}
|
- ctest --output-on-failure -j${JOBS}
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
|
|
@ -1,8 +1,25 @@
|
||||||
cmake_minimum_required(VERSION 3.2)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
project(nameof LANGUAGES CXX)
|
project(nameof LANGUAGES CXX)
|
||||||
|
set(${PROJECT_NAME} "0.5.0")
|
||||||
|
set(package_name ${PROJECT_NAME})
|
||||||
|
set(include_source_dir "${CMAKE_SOURCE_DIR}/include")
|
||||||
|
|
||||||
add_subdirectory(example)
|
option(NAMEOF_OPT_BUILD_EXAMPLES "Build nameof examples" ON)
|
||||||
|
option(NAMEOF_OPT_BUILD_TESTS "Build and perform nameof tests" ON)
|
||||||
|
|
||||||
enable_testing()
|
add_library(${package_name} INTERFACE)
|
||||||
add_subdirectory(test)
|
target_include_directories(${package_name} INTERFACE "$<BUILD_INTERFACE:${include_source_dir}>")
|
||||||
|
|
||||||
|
if(NAMEOF_OPT_BUILD_EXAMPLES)
|
||||||
|
add_subdirectory(example)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NAMEOF_OPT_BUILD_TESTS)
|
||||||
|
enable_testing()
|
||||||
|
add_subdirectory(test)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||||
|
|
Loading…
Reference in a new issue