diff --git a/recipes/xz_utils/all/test_package/CMakeLists.txt b/recipes/xz_utils/all/test_package/CMakeLists.txt index 2c93c26f9db55..34c55b9ba5a6e 100644 --- a/recipes/xz_utils/all/test_package/CMakeLists.txt +++ b/recipes/xz_utils/all/test_package/CMakeLists.txt @@ -1,12 +1,8 @@ -project(test_package) cmake_minimum_required(VERSION 2.8.11) - -set(CMAKE_VERBOSE_MAKEFILE TRUE) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() -file(GLOB SOURCE_FILES *.c) - -add_executable(${PROJECT_NAME} ${SOURCE_FILES}) +add_executable(${PROJECT_NAME} main.c) target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/xz_utils/all/test_package/conanfile.py b/recipes/xz_utils/all/test_package/conanfile.py index d9772f58af9f7..bd7165a553cf4 100644 --- a/recipes/xz_utils/all/test_package/conanfile.py +++ b/recipes/xz_utils/all/test_package/conanfile.py @@ -12,6 +12,6 @@ def build(self): cmake.build() def test(self): - # Test the library - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True)