mirror of https://github.com/opencv/opencv.git
HardFP and SoftFP toolchains joined to one; RPATH skiping added.pull/442/head
parent
b81f0887f0
commit
192ee15520
9 changed files with 66 additions and 84 deletions
@ -1,53 +0,0 @@ |
||||
set(CMAKE_SYSTEM_NAME Linux) |
||||
set(CMAKE_SYSTEM_VERSION 1) |
||||
set(CMAKE_SYSTEM_PROCESSOR arm) |
||||
|
||||
if (CARMA) |
||||
set(GCC_COMPILER_VERSION "4.5" CACHE STRING "GCC Compiler version") |
||||
else() |
||||
set(GCC_COMPILER_VERSION "4.6" CACHE STRING "GCC Compiler version") |
||||
endif() |
||||
|
||||
set(CMAKE_C_COMPILER arm-linux-gnueabi-gcc-${GCC_COMPILER_VERSION}) |
||||
set(CMAKE_CXX_COMPILER arm-linux-gnueabi-g++-${GCC_COMPILER_VERSION}) |
||||
|
||||
set(CMAKE_CXX_FLAGS "" CACHE STRING "c++ flags") |
||||
set(CMAKE_C_FLAGS "" CACHE STRING "c flags") |
||||
set(CMAKE_SHARED_LINKER_FLAGS "" CACHE STRING "shared linker flags") |
||||
set(CMAKE_MODULE_LINKER_FLAGS "" CACHE STRING "module linker flags") |
||||
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-z,nocopyreloc" CACHE STRING "executable linker flags") |
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mthumb -fdata-sections -Wa,--noexecstack -fsigned-char -Wno-psabi") |
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mthumb -fdata-sections -Wa,--noexecstack -fsigned-char -Wno-psabi") |
||||
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now ${CMAKE_SHARED_LINKER_FLAGS}") |
||||
set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now ${CMAKE_MODULE_LINKER_FLAGS}") |
||||
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now ${CMAKE_EXE_LINKER_FLAGS}") |
||||
|
||||
if(USE_NEON) |
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon") |
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon") |
||||
elseif(USE_VFPV3) |
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=vfpv3") |
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=vfpv3") |
||||
else() |
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=vfpv3-d16") |
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=vfpv3-d16") |
||||
endif() |
||||
|
||||
# can be any other plases |
||||
set(ARM_LINUX_SYSROOT /usr/arm-linux-gnueabi CACHE PATH "ARM cross compilation system root") |
||||
|
||||
set(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ${ARM_LINUX_SYSROOT}) |
||||
|
||||
if(EXISTS ${CUDA_TOOLKIT_ROOT_DIR}) |
||||
set(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ${CUDA_TOOLKIT_ROOT_DIR}) |
||||
endif() |
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) |
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY) |
||||
|
||||
if (CARMA) |
||||
add_definitions(-DCARMA) |
||||
endif() |
@ -1,17 +1,8 @@ |
||||
#!/bin/sh |
||||
# |
||||
# Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. |
||||
# |
||||
# NVIDIA Corporation and its licensors retain all intellectual property |
||||
# and proprietary rights in and to this software, related documentation |
||||
# and any modifications thereto. Any use, reproduction, disclosure or |
||||
# distribution of this software and related documentation without an express |
||||
# license agreement from NVIDIA Corporation is strictly prohibited. |
||||
# |
||||
|
||||
mkdir -p build_carma |
||||
cd build_carma |
||||
|
||||
cmake -DCARMA=ON -DWITH_TBB=ON -DBUILD_TBB=ON -DUSE_NEON=ON -DCUDA_TOOLKIT_ROOT_DIR=/usr/arm-linux-gnueabi/cuda/ \ |
||||
cmake -DSOFTFP=ON -DCARMA=ON -DWITH_TBB=ON -DBUILD_TBB=ON -DUSE_NEON=ON -DCUDA_TOOLKIT_ROOT_DIR=/usr/arm-linux-gnueabi/cuda/ \ |
||||
-DCUDA_ARCH_BIN="2.1(2.0)" -DCUDA_ARCH_PTX="" -DCMAKE_SKIP_RPATH=ON -DWITH_CUDA=ON -DWITH_CUBLAS=ON \ |
||||
-DCMAKE_TOOLCHAIN_FILE=../arm-gnueabi-softfp.toolchain.cmake $@ ../../.. |
||||
-DCMAKE_TOOLCHAIN_FILE=../arm-gnueabi.toolchain.cmake $@ ../../.. |
||||
|
Loading…
Reference in new issue