Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. from conans import ConanFile, CMake
  2. class ScopeguardConan(ConanFile):
  3. name = "scope-guard"
  4. version = "v0.3.4"
  5. license = "MIT"
  6. author = "offa <offa@github>"
  7. url = "https://github.com.offa/scope-guard"
  8. description = "Implementation of Scoped Guards and Unique Resource as proposed in P0052."
  9. homepage = "https://github.com/offa/scope-guard"
  10. topics = ("cpp", "cpp17", "p0052", "scope-guard",
  11. "scope-exit", "scope-fail", "scope-success", "unique-resource", "cmake")
  12. no_copy_source = True
  13. _source_dir = "{}-{}".format(name, version)
  14. scm = {
  15. "type": "git",
  16. "subfolder": _source_dir,
  17. "url": "{}.git".format(homepage),
  18. "revision": version
  19. }
  20. requires = (
  21. "catch2/2.13.4",
  22. "trompeloeil/39"
  23. )
  24. options = {
  25. "unittest": ["ON", "OFF"],
  26. "enable_compat_header": ["ON", "OFF"]
  27. }
  28. default_options = (
  29. "unittest=ON",
  30. "enable_compat_header=OFF"
  31. )
  32. def _configure_cmake(self):
  33. cmake = CMake(self)
  34. cmake.definitions["UNITTEST"] = self.options.unittest
  35. cmake.definitions["ENABLE_COMPAT_HEADER"] = self.options.enable_compat_header
  36. cmake.configure(source_folder=self._source_dir, build_folder="build")
  37. return cmake
  38. def package(self):
  39. cmake = self._configure_cmake()
  40. cmake.install()