Skip to content

Commit 5ba80e0

Browse files
committed
fix build: pass compiler.cppstd=20 to conan
commit_hash:de01b5c7aa9b6ed8cc00cf9920c64e0726c0208c
1 parent 79bbb3d commit 5ba80e0

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/ci-conan.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
- name: Run conan
7575
run: |
7676
${{ matrix.container && 'sudo -u test-user' }} git config --global --add safe.directory `pwd`
77-
${{ matrix.container && 'sudo -u test-user' }} conan create . --update --build=missing --version=`cat version.txt` -s:a compiler.cppstd=17 -pr:b=default ${{matrix.conanflags}}
77+
${{ matrix.container && 'sudo -u test-user' }} conan create . --update --build=missing --version=`cat version.txt` -s:a compiler.cppstd=20 -pr:b=default ${{matrix.conanflags}}
7878
7979
- name: Install test dependencies
8080
if: matrix.os == 'ubuntu-22.04'
@@ -120,7 +120,7 @@ jobs:
120120
s3api \
121121
; do
122122
mv conanfile.py $SAMPLE/
123-
echo "Run: ${{ matrix.container && 'sudo -u test-user' }} ${{matrix.tests-env}} conan test --build=never -s:a compiler.cppstd=17 -pr:b=default ${{matrix.conanflags}} $SAMPLE/ ${USERVER_VERSION}"
124-
${{ matrix.container && 'sudo -u test-user' }} ${{matrix.tests-env}} conan test --build=never -s:a compiler.cppstd=17 -pr:b=default ${{matrix.conanflags}} $SAMPLE/ ${USERVER_VERSION}
123+
echo "Run: ${{ matrix.container && 'sudo -u test-user' }} ${{matrix.tests-env}} conan test --build=never -s:a compiler.cppstd=20 -pr:b=default ${{matrix.conanflags}} $SAMPLE/ ${USERVER_VERSION}"
124+
${{ matrix.container && 'sudo -u test-user' }} ${{matrix.tests-env}} conan test --build=never -s:a compiler.cppstd=20 -pr:b=default ${{matrix.conanflags}} $SAMPLE/ ${USERVER_VERSION}
125125
mv $SAMPLE/conanfile.py ./
126126
done

conanfile.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from conan import ConanFile
66
from conan.errors import ConanInvalidConfiguration
7+
from conan.tools.build import check_min_cppstd
78
from conan.tools.cmake import CMake
89
from conan.tools.cmake import cmake_layout
910
from conan.tools.cmake import CMakeDeps
@@ -184,6 +185,8 @@ def build_requirements(self):
184185
self.tool_requires('protobuf/<host_version>')
185186

186187
def validate(self):
188+
check_min_cppstd(self, 20)
189+
187190
if self.settings.os == 'Windows':
188191
raise ConanInvalidConfiguration(
189192
'userver cannot be built on Windows',

scripts/docs/en/userver/build/build.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ To build the userver Conan package run the following in the userver root directo
431431
432432
```shell
433433
conan profile detect && conan profile show
434+
conan profile update settings.compiler.cppstd=20 default
434435
conan create . --build=missing --version=`cat version.txt` -pr:b=default
435436
```
436437

0 commit comments

Comments
 (0)