conanfile.py 642 B

1234567891011121314151617181920212223242526
  1. import os
  2. from conan import ConanFile
  3. from conan.tools.cmake import CMake, cmake_layout
  4. from conan.tools.build import can_run
  5. class tsdbTestConan(ConanFile):
  6. settings = "os", "compiler", "build_type", "arch"
  7. generators = "CMakeDeps", "CMakeToolchain"
  8. def requirements(self):
  9. self.requires(self.tested_reference_str)
  10. def build(self):
  11. cmake = CMake(self)
  12. cmake.configure()
  13. cmake.build()
  14. def layout(self):
  15. cmake_layout(self)
  16. def test(self):
  17. if can_run(self):
  18. cmd = os.path.join(self.cpp.build.bindir, "example")
  19. self.run(cmd, env="conanrun")