mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-01 19:34:29 +02:00
build: GENERATE_DOCS renamed to BUILD_DOCS
This commit is contained in:
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
@@ -79,7 +79,7 @@ jobs:
|
|||||||
conan remote add upload ${{ secrets.CONAN_UPLOAD }}
|
conan remote add upload ${{ secrets.CONAN_UPLOAD }}
|
||||||
conan remote add linear-algebra https://api.bintray.com/conan/twonington/public-conan
|
conan remote add linear-algebra https://api.bintray.com/conan/twonington/public-conan
|
||||||
mkdir _lgtm_build_dir && cd _lgtm_build_dir
|
mkdir _lgtm_build_dir && cd _lgtm_build_dir
|
||||||
conan install .. -s compiler.cppstd=20 -s compiler.libcxx=libstdc++11 -o mp-units:generate_docs=False -e mp-units:CONAN_RUN_TESTS=True -b outdated -u
|
conan install .. -s compiler.cppstd=20 -s compiler.libcxx=libstdc++11 -o mp-units:build_docs=False -e mp-units:CONAN_RUN_TESTS=True -b outdated -u
|
||||||
|
|
||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
|
2
.github/workflows/conan-ci.yml
vendored
2
.github/workflows/conan-ci.yml
vendored
@@ -54,7 +54,7 @@ jobs:
|
|||||||
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_LOGIN_USERNAME }}
|
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_LOGIN_USERNAME }}
|
||||||
CONAN_PASSWORD: ${{ secrets.CONAN_PASSWORD }}
|
CONAN_PASSWORD: ${{ secrets.CONAN_PASSWORD }}
|
||||||
CONAN_UPLOAD: ${{ secrets.CONAN_UPLOAD }}
|
CONAN_UPLOAD: ${{ secrets.CONAN_UPLOAD }}
|
||||||
CONAN_OPTIONS: mp-units:generate_docs=False
|
CONAN_OPTIONS: mp-units:build_docs=False
|
||||||
CONAN_CMAKE_GENERATOR: Ninja
|
CONAN_CMAKE_GENERATOR: Ninja
|
||||||
CONAN_DOCKER_IMAGE: conanio/${{ matrix.compiler.name }}${{ matrix.compiler.version }}
|
CONAN_DOCKER_IMAGE: conanio/${{ matrix.compiler.name }}${{ matrix.compiler.version }}
|
||||||
run: |
|
run: |
|
||||||
|
12
conanfile.py
12
conanfile.py
@@ -50,11 +50,11 @@ class UnitsConan(ConanFile):
|
|||||||
)
|
)
|
||||||
options = {
|
options = {
|
||||||
"downcast_mode": ["off", "on", "auto"],
|
"downcast_mode": ["off", "on", "auto"],
|
||||||
"generate_docs": [True, False]
|
"build_docs": [True, False]
|
||||||
}
|
}
|
||||||
default_options = {
|
default_options = {
|
||||||
"downcast_mode": "on",
|
"downcast_mode": "on",
|
||||||
"generate_docs": True
|
"build_docs": True
|
||||||
}
|
}
|
||||||
exports = ["LICENSE.md"]
|
exports = ["LICENSE.md"]
|
||||||
exports_sources = ["docs/*", "src/*", "test/*", "cmake/*", "example/*","CMakeLists.txt"]
|
exports_sources = ["docs/*", "src/*", "test/*", "cmake/*", "example/*","CMakeLists.txt"]
|
||||||
@@ -95,7 +95,7 @@ class UnitsConan(ConanFile):
|
|||||||
|
|
||||||
if self._run_tests:
|
if self._run_tests:
|
||||||
# developer's mode (unit tests, examples, documentation, restrictive compilation warnings, ...)
|
# developer's mode (unit tests, examples, documentation, restrictive compilation warnings, ...)
|
||||||
cmake.definitions["GENERATE_DOCS"] = self.options.generate_docs
|
cmake.definitions["BUILD_DOCS"] = self.options.build_docs
|
||||||
cmake.configure()
|
cmake.configure()
|
||||||
else:
|
else:
|
||||||
# consumer's mode (library sources only)
|
# consumer's mode (library sources only)
|
||||||
@@ -107,14 +107,14 @@ class UnitsConan(ConanFile):
|
|||||||
|
|
||||||
def config_options(self):
|
def config_options(self):
|
||||||
if not self._run_tests:
|
if not self._run_tests:
|
||||||
# generate_docs has sense only in a development or CI build
|
# build_docs has sense only in a development or CI build
|
||||||
del self.options.generate_docs
|
del self.options.build_docs
|
||||||
|
|
||||||
def build_requirements(self):
|
def build_requirements(self):
|
||||||
if self._run_tests:
|
if self._run_tests:
|
||||||
self.build_requires("catch2/2.13.0")
|
self.build_requires("catch2/2.13.0")
|
||||||
self.build_requires("linear_algebra/0.7.0@public-conan/stable")
|
self.build_requires("linear_algebra/0.7.0@public-conan/stable")
|
||||||
if self.options.generate_docs:
|
if self.options.build_docs:
|
||||||
self.build_requires("doxygen/1.8.20")
|
self.build_requires("doxygen/1.8.20")
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
|
@@ -22,8 +22,8 @@
|
|||||||
|
|
||||||
cmake_minimum_required(VERSION 3.12)
|
cmake_minimum_required(VERSION 3.12)
|
||||||
|
|
||||||
option(GENERATE_DOCS "Generate project documenation" ON)
|
option(BUILD_DOCS "Generate project documenation" ON)
|
||||||
if(NOT GENERATE_DOCS)
|
if(NOT BUILD_DOCS)
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@@ -144,8 +144,8 @@ UNITS_DOWNCAST_MODE
|
|||||||
Equivalent to `downcast_mode`_.
|
Equivalent to `downcast_mode`_.
|
||||||
|
|
||||||
|
|
||||||
GENERATE_DOCS
|
BUILD_DOCS
|
||||||
+++++++++++++
|
++++++++++
|
||||||
|
|
||||||
**Values**: ``ON``/``OFF``
|
**Values**: ``ON``/``OFF``
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user