mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-04 04:44:27 +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"
|
||||
)
|
||||
options = {
|
||||
"downcast": ["off", "on", "auto"]
|
||||
"downcast_mode": ["off", "on", "auto"]
|
||||
}
|
||||
default_options = {
|
||||
"downcast": "on"
|
||||
"downcast_mode": "on"
|
||||
}
|
||||
exports = ["LICENSE.md"]
|
||||
exports_sources = ["docs/*", "src/*", "test/*", "cmake/*", "example/*","CMakeLists.txt"]
|
||||
@@ -83,12 +83,12 @@ class UnitsConan(ConanFile):
|
||||
|
||||
def _configure_cmake(self, folder="src"):
|
||||
cmake = CMake(self)
|
||||
if self.options.downcast_dispatch_mode == "off":
|
||||
cmake.definitions["UNITS_DOWNCAST"] = 0
|
||||
elif self.options.downcast_dispatch_mode == "on":
|
||||
cmake.definitions["UNITS_DOWNCAST"] = 1
|
||||
elif self.options.downcast_dispatch_mode == "auto":
|
||||
cmake.definitions["UNITS_DOWNCAST"] = 2
|
||||
if self.options.downcast_mode == "off":
|
||||
cmake.definitions["DOWNCAST_MODE"] = 0
|
||||
elif self.options.downcast_mode == "on":
|
||||
cmake.definitions["DOWNCAST_MODE"] = 1
|
||||
elif self.options.downcast_mode == "auto":
|
||||
cmake.definitions["DOWNCAST_MODE"] = 2
|
||||
|
||||
if self._run_tests:
|
||||
# developer's mode (unit tests, examples, documentation, restrictive compilation warnings, ...)
|
||||
|
Reference in New Issue
Block a user