mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-04 12:54:25 +02:00
build: conanfile downcasting definitions fixed
This commit is contained in:
16
conanfile.py
16
conanfile.py
@@ -49,10 +49,10 @@ class UnitsConan(ConanFile):
|
|||||||
"ms-gsl/3.1.0"
|
"ms-gsl/3.1.0"
|
||||||
)
|
)
|
||||||
options = {
|
options = {
|
||||||
"downcast": ["off", "on", "auto"]
|
"downcast_mode": ["off", "on", "auto"]
|
||||||
}
|
}
|
||||||
default_options = {
|
default_options = {
|
||||||
"downcast": "on"
|
"downcast_mode": "on"
|
||||||
}
|
}
|
||||||
exports = ["LICENSE.md"]
|
exports = ["LICENSE.md"]
|
||||||
exports_sources = ["docs/*", "src/*", "test/*", "cmake/*", "example/*","CMakeLists.txt"]
|
exports_sources = ["docs/*", "src/*", "test/*", "cmake/*", "example/*","CMakeLists.txt"]
|
||||||
@@ -83,12 +83,12 @@ class UnitsConan(ConanFile):
|
|||||||
|
|
||||||
def _configure_cmake(self, folder="src"):
|
def _configure_cmake(self, folder="src"):
|
||||||
cmake = CMake(self)
|
cmake = CMake(self)
|
||||||
if self.options.downcast_dispatch_mode == "off":
|
if self.options.downcast_mode == "off":
|
||||||
cmake.definitions["UNITS_DOWNCAST"] = 0
|
cmake.definitions["DOWNCAST_MODE"] = 0
|
||||||
elif self.options.downcast_dispatch_mode == "on":
|
elif self.options.downcast_mode == "on":
|
||||||
cmake.definitions["UNITS_DOWNCAST"] = 1
|
cmake.definitions["DOWNCAST_MODE"] = 1
|
||||||
elif self.options.downcast_dispatch_mode == "auto":
|
elif self.options.downcast_mode == "auto":
|
||||||
cmake.definitions["UNITS_DOWNCAST"] = 2
|
cmake.definitions["DOWNCAST_MODE"] = 2
|
||||||
|
|
||||||
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, ...)
|
||||||
|
Reference in New Issue
Block a user