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 (#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>
This commit is contained in:
parent
80d8e942c5
commit
b974f81804
@ -1,5 +1,5 @@
|
||||
from conans import ConanFile, CMake
|
||||
from conans.tools import load
|
||||
from conans.tools import load, cross_building
|
||||
import re
|
||||
|
||||
|
||||
@ -40,6 +40,7 @@ class CLI11Conan(ConanFile):
|
||||
cmake.definitions["CLI11_SINGLE_FILE"] = "OFF"
|
||||
cmake.configure()
|
||||
cmake.build()
|
||||
if not cross_building(self.settings):
|
||||
cmake.test()
|
||||
cmake.install()
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
from conans import ConanFile, CMake
|
||||
from conans import ConanFile, CMake, tools
|
||||
import os
|
||||
|
||||
|
||||
@ -16,5 +16,6 @@ class HelloTestConan(ConanFile):
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user