build: GENERATE_DOCS renamed to BUILD_DOCS
This commit is contained in:
1 parent
85d174ccbe
commit
c8f67ab5bf
5 files changed
+12
-12
No files matched your search
+6
-6
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user