Home | History | Annotate | Download | only in catch2
      1 #!/usr/bin/env python
      2 from conans import ConanFile, CMake
      3 
      4 
      5 class CatchConan(ConanFile):
      6     name = "Catch2"
      7     description = "A modern, C++-native, header-only, framework for unit-tests, TDD and BDD"
      8     topics = ("conan", "catch2", "header-only", "unit-test", "tdd", "bdd")
      9     url = "https://github.com/catchorg/Catch2"
     10     homepage = url
     11     license = "BSL-1.0"
     12     exports = "LICENSE.txt"
     13     exports_sources = ("single_include/*", "CMakeLists.txt", "CMake/*", "contrib/*")
     14     generators = "cmake"
     15 
     16     def package(self):
     17         cmake = CMake(self)
     18         cmake.definitions["BUILD_TESTING"] = "OFF"
     19         cmake.definitions["CATCH_INSTALL_DOCS"] = "OFF"
     20         cmake.definitions["CATCH_INSTALL_HELPERS"] = "ON"
     21         cmake.configure()
     22         cmake.install()
     23 
     24         self.copy(pattern="LICENSE.txt", dst="licenses")
     25 
     26     def package_id(self):
     27         self.info.header_only()
     28