diff options
author | Damjan Marion <damarion@cisco.com> | 2019-01-15 00:36:03 +0100 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2019-01-17 20:43:27 +0000 |
commit | dd3952923a2cfb9fa2276a4f1f6512ff75e1a155 (patch) | |
tree | 6065513bac01b665c1925d31cf8b7d982ac9acd5 /src/CMakeLists.txt | |
parent | 58a93e8ef288b0bae75ec7186ba96bdcaf85d0d4 (diff) |
cmake: initial cross-compilation support
Change-Id: Ib9c2aba1eda08a22465441e33553b9b744c79d56
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fedf931f041..b404b5069b4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -33,6 +33,16 @@ string(REPLACE "-" ";" VPP_LIB_VERSION ${VPP_VERSION}) list(GET VPP_LIB_VERSION 0 VPP_LIB_VERSION) ############################################################################## +# cross compiling +############################################################################## +if(CMAKE_CROSSCOMPILING) + set(CMAKE_IGNORE_PATH + /usr/lib/${CMAKE_HOST_SYSTEM_PROCESSOR}-linux-gnu/ + /usr/lib/${CMAKE_HOST_SYSTEM_PROCESSOR}-linux-gnu/lib/ + ) +endif() + +############################################################################## # build config ############################################################################## set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) @@ -123,6 +133,7 @@ pr("VPP library version" "${VPP_LIB_VERSION}") pr("GIT toplevel dir" "${VPP_GIT_TOPLEVEL_DIR}") pr("C flags" "${CMAKE_C_FLAGS}") pr("Linker flags" "${CMAKE_LINKER_FLAGS}") +pr("Host processor" "${CMAKE_HOST_SYSTEM_PROCESSOR}") pr("Target processor" "${CMAKE_SYSTEM_PROCESSOR}") pr("Build type" "${CMAKE_BUILD_TYPE}") pr("Prefix path" "${CMAKE_PREFIX_PATH}") |