mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-04-29 12:13:52 +00:00
* 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>
22 lines
535 B
Python
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)
|