ci: fixed setting Ninja as a default generator for Conan

This commit is contained in:
Mateusz Pusz
2021-04-29 11:24:52 +02:00
parent a790863324
commit d1473bfde7
5 changed files with 5 additions and 2 deletions

View File

@@ -84,6 +84,7 @@ jobs:
CC: ${{ matrix.config.compiler.cc }}
CXX: ${{ matrix.config.compiler.cxx }}
CMAKE_GENERATOR: Ninja
CONAN_CMAKE_GENERATOR: Ninja
steps:
- uses: actions/checkout@v2

View File

@@ -80,6 +80,8 @@ jobs:
python-version: '3.8'
- name: Conan build
if: matrix.language == 'cpp'
env:
CONAN_CMAKE_GENERATOR: Ninja
run: |
pip install -U conan
conan config init

View File

@@ -40,6 +40,7 @@ env:
CC: gcc-10
CXX: g++-10
CMAKE_GENERATOR: Ninja
CONAN_CMAKE_GENERATOR: Ninja
jobs:
docs:

View File

@@ -102,7 +102,7 @@ class UnitsConan(ConanFile):
# del self.options.build_docs
def generate(self):
tc = CMakeToolchain(self)
tc = CMakeToolchain(self, generator=os.getenv("CONAN_CMAKE_GENERATOR"))
tc.variables["UNITS_DOWNCAST_MODE"] = str(self.options.downcast_mode).upper()
# if self._run_tests: # TODO Enable this when environment is supported in the Conan toolchain
tc.variables["UNITS_BUILD_DOCS"] = self.options.build_docs

View File

@@ -92,7 +92,6 @@ in *~/.conan/profiles* directory. An example profile can look as follows:
[env]
CC=/usr/bin/gcc-10
CXX=/usr/bin/g++-10
CONAN_CMAKE_GENERATOR=Ninja
.. tip::