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 not exist build mkdir build
|
||||
- cd build
|
||||
- cmake -G "%GENERATOR%" -A %PLATFORM% -DCMAKE_BUILD_TYPE=${CONFIGURATION} ..
|
||||
- cmake -G "%GENERATOR%" -A %PLATFORM% ..
|
||||
|
||||
build_script:
|
||||
- cmake --build . --config %CONFIGURATION%
|
||||
|
|
58
.travis.yml
58
.travis.yml
|
@ -19,7 +19,7 @@ matrix:
|
|||
packages:
|
||||
- g++-4.8
|
||||
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
|
||||
compiler: g++
|
||||
|
@ -30,7 +30,7 @@ matrix:
|
|||
packages:
|
||||
- g++-4.9
|
||||
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
|
||||
compiler: g++
|
||||
|
@ -41,7 +41,7 @@ matrix:
|
|||
packages:
|
||||
- g++-5
|
||||
env:
|
||||
- CXX_COMPILER=g++-5 CC_COMPILER=gcc-5 CONFIGURATION=Debug
|
||||
- CXX_COMPILER=g++-5 CC_COMPILER=gcc-5
|
||||
|
||||
- os: linux
|
||||
compiler: g++
|
||||
|
@ -52,7 +52,7 @@ matrix:
|
|||
packages:
|
||||
- g++-6
|
||||
env:
|
||||
- CXX_COMPILER=g++-6 CC_COMPILER=gcc-6 CONFIGURATION=Debug
|
||||
- CXX_COMPILER=g++-6 CC_COMPILER=gcc-6
|
||||
|
||||
- os: linux
|
||||
compiler: g++
|
||||
|
@ -63,7 +63,7 @@ matrix:
|
|||
packages:
|
||||
- g++-7
|
||||
env:
|
||||
- CXX_COMPILER=g++-7 CC_COMPILER=gcc-7 CONFIGURATION=Debug
|
||||
- CXX_COMPILER=g++-7 CC_COMPILER=gcc-7
|
||||
|
||||
- os: linux
|
||||
compiler: g++
|
||||
|
@ -74,7 +74,7 @@ matrix:
|
|||
packages:
|
||||
- g++-8
|
||||
env:
|
||||
- CXX_COMPILER=g++-8 CC_COMPILER=gcc-8 CONFIGURATION=Debug
|
||||
- CXX_COMPILER=g++-8 CC_COMPILER=gcc-8
|
||||
|
||||
- os: linux
|
||||
compiler: clang++
|
||||
|
@ -86,7 +86,7 @@ matrix:
|
|||
packages:
|
||||
- clang-3.6
|
||||
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
|
||||
compiler: clang++
|
||||
|
@ -98,7 +98,7 @@ matrix:
|
|||
packages:
|
||||
- clang-3.7
|
||||
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
|
||||
compiler: clang++
|
||||
|
@ -110,7 +110,7 @@ matrix:
|
|||
packages:
|
||||
- clang-3.8
|
||||
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
|
||||
compiler: clang++
|
||||
|
@ -122,7 +122,7 @@ matrix:
|
|||
packages:
|
||||
- clang-3.9
|
||||
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
|
||||
compiler: clang++
|
||||
|
@ -134,7 +134,7 @@ matrix:
|
|||
packages:
|
||||
- clang-4.0
|
||||
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
|
||||
compiler: clang++
|
||||
|
@ -146,7 +146,7 @@ matrix:
|
|||
packages:
|
||||
- clang-5.0
|
||||
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
|
||||
compiler: clang++
|
||||
|
@ -158,85 +158,85 @@ matrix:
|
|||
packages:
|
||||
- clang-6.0
|
||||
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
|
||||
compiler: clang++
|
||||
osx_image: xcode7.0
|
||||
env:
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||
|
||||
- os: osx
|
||||
compiler: clang++
|
||||
osx_image: xcode7.1
|
||||
env:
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||
|
||||
- os: osx
|
||||
compiler: clang++
|
||||
osx_image: xcode7.2
|
||||
env:
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||
|
||||
- os: osx
|
||||
compiler: clang++
|
||||
osx_image: xcode7.3
|
||||
env:
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||
|
||||
- os: osx
|
||||
compiler: clang++
|
||||
osx_image: xcode8.0
|
||||
env:
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||
|
||||
- os: osx
|
||||
compiler: clang++
|
||||
osx_image: xcode8.1
|
||||
env:
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||
|
||||
- os: osx
|
||||
compiler: clang++
|
||||
osx_image: xcode8.2
|
||||
env:
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||
|
||||
- os: osx
|
||||
compiler: clang++
|
||||
osx_image: xcode8.3
|
||||
env:
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||
|
||||
- os: osx
|
||||
compiler: clang++
|
||||
osx_image: xcode9.0
|
||||
env:
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||
|
||||
- os: osx
|
||||
compiler: clang++
|
||||
osx_image: xcode9.1
|
||||
env:
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||
|
||||
- os: osx
|
||||
compiler: clang++
|
||||
osx_image: xcode9.2
|
||||
env:
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||
|
||||
- os: osx
|
||||
compiler: clang++
|
||||
osx_image: xcode9.3
|
||||
env:
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||
|
||||
- os: osx
|
||||
compiler: clang++
|
||||
osx_image: xcode9.4
|
||||
env:
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang CONFIGURATION=Debug
|
||||
- CXX_COMPILER=clang++ CC_COMPILER=clang
|
||||
|
||||
install:
|
||||
- export CC=${CC_COMPILER}
|
||||
|
@ -274,11 +274,11 @@ before_script:
|
|||
- rm -rf build
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
- cmake -DCMAKE_BUILD_TYPE=${CONFIGURATION} ..
|
||||
- cmake -G "Unix Makefiles" ..
|
||||
|
||||
script:
|
||||
- cmake --build . --config ${CONFIGURATION} -- -j${JOBS}
|
||||
- ctest --output-on-failure -С ${CONFIGURATION} -j${JOBS}
|
||||
- cmake --build . -- -j${JOBS}
|
||||
- ctest --output-on-failure -j${JOBS}
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
|
|
@ -1,8 +1,25 @@
|
|||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
project(nameof LANGUAGES CXX)
|
||||
set(${PROJECT_NAME} "0.5.0")
|
||||
set(package_name ${PROJECT_NAME})
|
||||
set(include_source_dir "${CMAKE_SOURCE_DIR}/include")
|
||||
|
||||
option(NAMEOF_OPT_BUILD_EXAMPLES "Build nameof examples" ON)
|
||||
option(NAMEOF_OPT_BUILD_TESTS "Build and perform nameof tests" ON)
|
||||
|
||||
add_library(${package_name} INTERFACE)
|
||||
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