Skip to content

Commit

Permalink
Update conanfile.py with additional option
Browse files Browse the repository at this point in the history
cbor library has an option to be compiled with custom allocators by adding CBOR_CUSTOM_ALLOC to the cmake command.
extend the conanfile.py with ability to specify the option above.
  • Loading branch information
afedechko authored Aug 4, 2020
1 parent 74c8520 commit 17b160b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion recipes/libcbor/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ class LibCborStackConan(ConanFile):
options = {
"shared": [True, False],
"fPIC": [True, False],
"custom_alloc": [True, False]
}
default_options = {
"shared": False,
"fPIC": True
"fPIC": True,
"custom_alloc": False
}
generators = "cmake"

Expand Down Expand Up @@ -51,6 +53,7 @@ def _configure_cmake(self):
self._cmake = CMake(self)
self._cmake.definitions["WITH_EXAMPLES"] = False
self._cmake.definitions["SANITIZE"] = False
self._cmake.definitions["CBOR_CUSTOM_ALLOC"] = self.options.custom_alloc

self._cmake.configure(build_folder=self._build_subfolder)
return self._cmake
Expand Down

0 comments on commit 17b160b

Please sign in to comment.