forked from mpusz/mp-units
ci: fixed setting Ninja as a default generator for Conan
This commit is contained in:
1
.github/workflows/ci-test-package-cmake.yml
vendored
1
.github/workflows/ci-test-package-cmake.yml
vendored
@@ -84,6 +84,7 @@ jobs:
|
|||||||
CC: ${{ matrix.config.compiler.cc }}
|
CC: ${{ matrix.config.compiler.cc }}
|
||||||
CXX: ${{ matrix.config.compiler.cxx }}
|
CXX: ${{ matrix.config.compiler.cxx }}
|
||||||
CMAKE_GENERATOR: Ninja
|
CMAKE_GENERATOR: Ninja
|
||||||
|
CONAN_CMAKE_GENERATOR: Ninja
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
@@ -80,6 +80,8 @@ jobs:
|
|||||||
python-version: '3.8'
|
python-version: '3.8'
|
||||||
- name: Conan build
|
- name: Conan build
|
||||||
if: matrix.language == 'cpp'
|
if: matrix.language == 'cpp'
|
||||||
|
env:
|
||||||
|
CONAN_CMAKE_GENERATOR: Ninja
|
||||||
run: |
|
run: |
|
||||||
pip install -U conan
|
pip install -U conan
|
||||||
conan config init
|
conan config init
|
||||||
|
1
.github/workflows/documentation.yml
vendored
1
.github/workflows/documentation.yml
vendored
@@ -40,6 +40,7 @@ env:
|
|||||||
CC: gcc-10
|
CC: gcc-10
|
||||||
CXX: g++-10
|
CXX: g++-10
|
||||||
CMAKE_GENERATOR: Ninja
|
CMAKE_GENERATOR: Ninja
|
||||||
|
CONAN_CMAKE_GENERATOR: Ninja
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docs:
|
docs:
|
||||||
|
@@ -102,7 +102,7 @@ class UnitsConan(ConanFile):
|
|||||||
# del self.options.build_docs
|
# del self.options.build_docs
|
||||||
|
|
||||||
def generate(self):
|
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()
|
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
|
# if self._run_tests: # TODO Enable this when environment is supported in the Conan toolchain
|
||||||
tc.variables["UNITS_BUILD_DOCS"] = self.options.build_docs
|
tc.variables["UNITS_BUILD_DOCS"] = self.options.build_docs
|
||||||
|
@@ -92,7 +92,6 @@ in *~/.conan/profiles* directory. An example profile can look as follows:
|
|||||||
[env]
|
[env]
|
||||||
CC=/usr/bin/gcc-10
|
CC=/usr/bin/gcc-10
|
||||||
CXX=/usr/bin/g++-10
|
CXX=/usr/bin/g++-10
|
||||||
CONAN_CMAKE_GENERATOR=Ninja
|
|
||||||
|
|
||||||
.. tip::
|
.. tip::
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user