1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-04-29 20:23:55 +00:00
CLI11/test_package/conanfile.py
geir-t b974f81804
conan: Do not run tests when cross compiling (#430)
* conan: Do not run tests when cross compiling

Running conan create with a profile made for cross compiling would fail since the tests is not compiled for build OS

* Using suggestion from Conan docs

* conan: also add cross_building check in build step

Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
2020-02-17 14:02:45 +00:00

22 lines
535 B
Python

from conans import ConanFile, CMake, tools
import os
class HelloTestConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake"
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def imports(self):
self.copy("*.dll", dst="bin", src="bin")
self.copy("*.dylib*", dst="bin", src="lib")
def test(self):
if not tools.cross_building(self.settings):
os.chdir("bin")
self.run(".%sexample" % os.sep)