fix non stdc++17 buildbots
This commit is contained in:
parent
a362b570bb
commit
7276880fdf
3 changed files with 38 additions and 37 deletions
23
.travis.yml
23
.travis.yml
|
@ -24,15 +24,6 @@ osx: &osx
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
# - <<: *linux
|
|
||||||
# env: CONAN_GCC_VERSIONS=4.9 CONAN_DOCKER_IMAGE=conanio/gcc49
|
|
||||||
|
|
||||||
# - <<: *linux
|
|
||||||
# env: CONAN_GCC_VERSIONS=5 CONAN_DOCKER_IMAGE=conanio/gcc5
|
|
||||||
|
|
||||||
# - <<: *linux
|
|
||||||
# env: CONAN_GCC_VERSIONS=6 CONAN_DOCKER_IMAGE=conanio/gcc6
|
|
||||||
|
|
||||||
- <<: *linux
|
- <<: *linux
|
||||||
env: CONAN_GCC_VERSIONS=7 CONAN_DOCKER_IMAGE=conanio/gcc7
|
env: CONAN_GCC_VERSIONS=7 CONAN_DOCKER_IMAGE=conanio/gcc7
|
||||||
|
|
||||||
|
@ -42,12 +33,6 @@ matrix:
|
||||||
- <<: *linux
|
- <<: *linux
|
||||||
env: CONAN_GCC_VERSIONS=9 CONAN_DOCKER_IMAGE=conanio/gcc9
|
env: CONAN_GCC_VERSIONS=9 CONAN_DOCKER_IMAGE=conanio/gcc9
|
||||||
|
|
||||||
# - <<: *linux
|
|
||||||
# env: CONAN_CLANG_VERSIONS=3.9 CONAN_DOCKER_IMAGE=conanio/clang39
|
|
||||||
|
|
||||||
- <<: *linux
|
|
||||||
env: CONAN_CLANG_VERSIONS=4.0 CONAN_DOCKER_IMAGE=conanio/clang40
|
|
||||||
|
|
||||||
- <<: *linux
|
- <<: *linux
|
||||||
env: CONAN_CLANG_VERSIONS=5.0 CONAN_DOCKER_IMAGE=conanio/clang50
|
env: CONAN_CLANG_VERSIONS=5.0 CONAN_DOCKER_IMAGE=conanio/clang50
|
||||||
|
|
||||||
|
@ -60,14 +45,6 @@ matrix:
|
||||||
- <<: *linux
|
- <<: *linux
|
||||||
env: CONAN_CLANG_VERSIONS=8 CONAN_DOCKER_IMAGE=conanio/clang8
|
env: CONAN_CLANG_VERSIONS=8 CONAN_DOCKER_IMAGE=conanio/clang8
|
||||||
|
|
||||||
- <<: *osx
|
|
||||||
osx_image: xcode7.3
|
|
||||||
env: CONAN_APPLE_CLANG_VERSIONS=7.3
|
|
||||||
|
|
||||||
- <<: *osx
|
|
||||||
osx_image: xcode8.3
|
|
||||||
env: CONAN_APPLE_CLANG_VERSIONS=8.1
|
|
||||||
|
|
||||||
- <<: *osx
|
- <<: *osx
|
||||||
osx_image: xcode9.2
|
osx_image: xcode9.2
|
||||||
env: CONAN_APPLE_CLANG_VERSIONS=9.0
|
env: CONAN_APPLE_CLANG_VERSIONS=9.0
|
||||||
|
|
18
appveyor.yml
18
appveyor.yml
|
@ -4,18 +4,18 @@ environment:
|
||||||
PYTHON: "C:\\Python37"
|
PYTHON: "C:\\Python37"
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
- MINGW_CONFIGURATIONS: '4.9@x86_64@seh@posix, 5@x86_64@seh@posix, 6@x86_64@seh@posix, 7@x86_64@seh@posix'
|
- MINGW_CONFIGURATIONS: '7@x86_64@seh@posix, 7@x86@seh@posix, 8@x86_64@seh@posix, 8@x86@seh@posix'
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
CONAN_VISUAL_VERSIONS: 14
|
CONAN_VISUAL_VERSIONS: 15
|
||||||
CONAN_BUILD_TYPES: Release
|
CONAN_BUILD_TYPES: Release
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
CONAN_VISUAL_VERSIONS: 14
|
CONAN_VISUAL_VERSIONS: 15
|
||||||
CONAN_BUILD_TYPES: Debug
|
CONAN_BUILD_TYPES: Debug
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||||
CONAN_VISUAL_VERSIONS: 15
|
CONAN_VISUAL_VERSIONS: 16
|
||||||
CONAN_BUILD_TYPES: Release
|
CONAN_BUILD_TYPES: Release
|
||||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||||
CONAN_VISUAL_VERSIONS: 15
|
CONAN_VISUAL_VERSIONS: 16
|
||||||
CONAN_BUILD_TYPES: Debug
|
CONAN_BUILD_TYPES: Debug
|
||||||
|
|
||||||
|
|
||||||
|
|
34
conanfile.py
34
conanfile.py
|
@ -1,9 +1,9 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from conans import ConanFile, tools, CMake
|
from conans import ConanFile, CMake
|
||||||
import os
|
from conans.model.version import Version
|
||||||
|
from conans.errors import ConanException
|
||||||
|
|
||||||
class NameofConan(ConanFile):
|
class NameofConan(ConanFile):
|
||||||
name = 'nameof'
|
name = 'nameof'
|
||||||
|
@ -32,15 +32,39 @@ class NameofConan(ConanFile):
|
||||||
'build_examples': False,
|
'build_examples': False,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@property
|
||||||
|
def supports_string_view(self):
|
||||||
|
compiler = str(self.settings.compiler)
|
||||||
|
version = Version(str(self.settings.compiler.version))
|
||||||
|
if compiler == 'Visual Studio' and version >= Version('15'):
|
||||||
|
return True
|
||||||
|
if compiler == 'gcc' and version >= Version('7'):
|
||||||
|
return True
|
||||||
|
if compiler == 'icc' and version >= Version('19'):
|
||||||
|
return True
|
||||||
|
if compiler == 'clang' and version >= Version('5'):
|
||||||
|
return True
|
||||||
|
if compiler == 'apple-clang' and version >= Version('9'):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
def requirements(self):
|
def requirements(self):
|
||||||
if self.options.build_tests:
|
if self.options.build_tests:
|
||||||
self.requires('Catch2/2.9.1@catchorg/stable')
|
self.requires('Catch2/2.9.1@catchorg/stable')
|
||||||
|
|
||||||
|
def configure(self):
|
||||||
|
if not self.supports_string_view:
|
||||||
|
raise ConanException('The specified compiler must support C++17')
|
||||||
|
|
||||||
def config_options(self):
|
def config_options(self):
|
||||||
needs_build = self.options.build_tests or self.options.build_examples
|
needs_build = self.options.build_tests or self.options.build_examples
|
||||||
|
|
||||||
|
# remove all build settings since it is a header-only library
|
||||||
if not needs_build:
|
if not needs_build:
|
||||||
# remove all build settings since it is a header-only library
|
del self.options.os
|
||||||
self.options.remove(['os', 'compiler', 'build_type', 'arch'])
|
del self.options.compiler
|
||||||
|
del self.options.build_type
|
||||||
|
del self.options.arch
|
||||||
|
|
||||||
def configure_cmake(self):
|
def configure_cmake(self):
|
||||||
cmake = CMake(self)
|
cmake = CMake(self)
|
||||||
|
|
Loading…
Reference in a new issue