build: GENERATE_DOCS renamed to BUILD_DOCS

This commit is contained in:
Mateusz Pusz
2020-11-05 16:51:42 +01:00
parent 85d174ccbe
commit c8f67ab5bf
5 changed files with 12 additions and 12 deletions

View File

@@ -79,7 +79,7 @@ jobs:
conan remote add upload ${{ secrets.CONAN_UPLOAD }}
conan remote add linear-algebra https://api.bintray.com/conan/twonington/public-conan
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).
# If this step fails, then you should remove it and run the build manually (see below)

View File

@@ -54,7 +54,7 @@ jobs:
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_LOGIN_USERNAME }}
CONAN_PASSWORD: ${{ secrets.CONAN_PASSWORD }}
CONAN_UPLOAD: ${{ secrets.CONAN_UPLOAD }}
CONAN_OPTIONS: mp-units:generate_docs=False
CONAN_OPTIONS: mp-units:build_docs=False
CONAN_CMAKE_GENERATOR: Ninja
CONAN_DOCKER_IMAGE: conanio/${{ matrix.compiler.name }}${{ matrix.compiler.version }}
run: |

View File

@@ -50,11 +50,11 @@ class UnitsConan(ConanFile):
)
options = {
"downcast_mode": ["off", "on", "auto"],
"generate_docs": [True, False]
"build_docs": [True, False]
}
default_options = {
"downcast_mode": "on",
"generate_docs": True
"build_docs": True
}
exports = ["LICENSE.md"]
exports_sources = ["docs/*", "src/*", "test/*", "cmake/*", "example/*","CMakeLists.txt"]
@@ -95,7 +95,7 @@ class UnitsConan(ConanFile):
if self._run_tests:
# 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()
else:
# consumer's mode (library sources only)
@@ -107,14 +107,14 @@ class UnitsConan(ConanFile):
def config_options(self):
if not self._run_tests:
# generate_docs has sense only in a development or CI build
del self.options.generate_docs
# build_docs has sense only in a development or CI build
del self.options.build_docs
def build_requirements(self):
if self._run_tests:
self.build_requires("catch2/2.13.0")
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")
def build(self):

View File

@@ -22,8 +22,8 @@
cmake_minimum_required(VERSION 3.12)
option(GENERATE_DOCS "Generate project documenation" ON)
if(NOT GENERATE_DOCS)
option(BUILD_DOCS "Generate project documenation" ON)
if(NOT BUILD_DOCS)
return()
endif()

View File

@@ -144,8 +144,8 @@ UNITS_DOWNCAST_MODE
Equivalent to `downcast_mode`_.
GENERATE_DOCS
+++++++++++++
BUILD_DOCS
++++++++++
**Values**: ``ON``/``OFF``