2021-02-18 03:46:53 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# This program and the accompanying materials are made available under the
|
|
|
|
# terms of the Apache License, Version 2.0 which is available at
|
|
|
|
# https://www.apache.org/licenses/LICENSE-2.0.
|
|
|
|
#
|
|
|
|
# See the NOTICE file distributed with this work for additional
|
|
|
|
# information regarding copyright ownership.
|
|
|
|
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations
|
|
|
|
# under the License.
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
################################################################################
|
2019-06-06 14:21:15 +02:00
|
|
|
# CMake toolchain to build libnd4j for Raspberry PI. Sample usage:
|
|
|
|
#
|
|
|
|
# PI_BIN=/path/to/raspberrypi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf \
|
|
|
|
# cmake -DCMAKE_TOOLCHAIN_FILE=rpi.cmake -DCMAKE_INSTALL_PREFIX=..
|
|
|
|
|
|
|
|
SET(CMAKE_SYSTEM_NAME Linux)
|
|
|
|
SET(CMAKE_SYSTEM_VERSION 1)
|
|
|
|
|
2021-02-01 06:31:20 +01:00
|
|
|
set(CMAKE_C_COMPILER "$ENV{RPI_BIN}-gcc" CACHE STRING "" FORCE)
|
|
|
|
set(CMAKE_CXX_COMPILER "$ENV{RPI_BIN}-g++" CACHE STRING "" FORCE)
|
2019-06-06 14:21:15 +02:00
|
|
|
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
|
|
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
|
|
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|