* Try to improve gflags * Try to improve gflags: part 2 * Tried to use dependencies on system * Use nlohmann_jsonConfig from system * Enabled nlohmann_json from system * Improvements * handle system gflags in developer package * Simplifications * Simplify dependency management * Corrected package names * Fixed subgraphsDumper configure stage * Try to fix rhel8 * Try to fix macosx * Fixed VPUX build * Fixed aliasing issues * Suppress some wanrings * export gflags when build it * Fixed some LTO * Try to fix Mac * revert * use gflags as private dependency * Aligned targets in developer package * Fixed frontends tests build on U20 with LTO * PAssed * Don't use pkg_search_module(zlib ..) during cross-compilation * Removed unused variables * Fixed finding of zlib during cross-compilation
75 lines
1.9 KiB
CMake
75 lines
1.9 KiB
CMake
# Copyright (C) 2018-2022 Intel Corporation
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
set(CMAKE_SYSTEM_NAME Linux)
|
|
set(CMAKE_SYSTEM_PROCESSOR armv7l)
|
|
|
|
set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
|
|
set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)
|
|
set(PKG_CONFIG_EXECUTABLE arm-linux-gnueabihf-pkg-config CACHE PATH "Path to ARM pkg-config")
|
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
|
|
|
macro(__cmake_find_root_save_and_reset)
|
|
foreach(v
|
|
CMAKE_FIND_ROOT_PATH_MODE_LIBRARY
|
|
CMAKE_FIND_ROOT_PATH_MODE_INCLUDE
|
|
CMAKE_FIND_ROOT_PATH_MODE_PACKAGE
|
|
CMAKE_FIND_ROOT_PATH_MODE_PROGRAM
|
|
)
|
|
set(__save_${v} ${${v}})
|
|
set(${v} NEVER)
|
|
endforeach()
|
|
endmacro()
|
|
|
|
macro(__cmake_find_root_restore)
|
|
foreach(v
|
|
CMAKE_FIND_ROOT_PATH_MODE_LIBRARY
|
|
CMAKE_FIND_ROOT_PATH_MODE_INCLUDE
|
|
CMAKE_FIND_ROOT_PATH_MODE_PACKAGE
|
|
CMAKE_FIND_ROOT_PATH_MODE_PROGRAM
|
|
)
|
|
set(${v} ${__save_${v}})
|
|
unset(__save_${v})
|
|
endforeach()
|
|
endmacro()
|
|
|
|
|
|
# macro to find programs on the host OS
|
|
macro(find_host_program)
|
|
__cmake_find_root_save_and_reset()
|
|
if(CMAKE_HOST_WIN32)
|
|
SET(WIN32 1)
|
|
SET(UNIX)
|
|
elseif(CMAKE_HOST_APPLE)
|
|
SET(APPLE 1)
|
|
SET(UNIX)
|
|
endif()
|
|
find_program(${ARGN})
|
|
SET(WIN32)
|
|
SET(APPLE)
|
|
SET(UNIX 1)
|
|
__cmake_find_root_restore()
|
|
endmacro()
|
|
|
|
# macro to find packages on the host OS
|
|
macro(find_host_package)
|
|
__cmake_find_root_save_and_reset()
|
|
if(CMAKE_HOST_WIN32)
|
|
SET(WIN32 1)
|
|
SET(UNIX)
|
|
elseif(CMAKE_HOST_APPLE)
|
|
SET(APPLE 1)
|
|
SET(UNIX)
|
|
endif()
|
|
find_package(${ARGN})
|
|
SET(WIN32)
|
|
SET(APPLE)
|
|
SET(UNIX 1)
|
|
__cmake_find_root_restore()
|
|
endmacro()
|