Changeset 68 in flair-dev for trunk/scripts/cmake_codelite.sh


Ignore:
Timestamp:
Mar 6, 2018, 12:14:17 PM (3 years ago)
Author:
Sanahuja Guillaume
Message:

maj for armv5te

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/cmake_codelite.sh

    r43 r68  
    1 DIR=build_$(uname -m)
     1#!/bin/bash
    22
    33function info () {
     
    1414}
    1515
     16if [ $(uname -m) != "x86_64" ]; then
     17    err "unsupported host architecture, you need a x86_64 cpu"
     18fi
     19
    1620if ! [ -f  ./CMakeLists.txt ]; then
    1721        err "Current directory does not contain CMakeLists.txt"
     
    2731                err "Error: build already exsits and is a directory; it should be a symlink."
    2832        fi
    29         if ! readlink build | grep -w $DIR >/dev/null; then
     33        if ! readlink build | grep -w build_core2_64 >/dev/null; then
    3034                warn "Warnink, build was pointing to another directory."
    3135        fi
     
    3337fi
    3438
    35 #creation du repertoire
    36 mkdir -p $DIR
     39#iterate over available toolchains
     40toolchains=($OECORE_CMAKE_TOOLCHAINS)
     41for arch in ${toolchains[@]}; do
     42    info "*************  Creating project for $arch *************"
     43    toolchain=$(eval "echo \"\$OECORE_CMAKE_${arch^^}_TOOLCHAIN\"")
     44    mkdir -p build_${arch}
     45    cd build_${arch}
     46    rm -f CMakeCache.txt
     47    rm -rf CMakeFiles
     48
     49    ${CMAKE} ../ -G "CodeLite - Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=${toolchain} -DCMAKE_CODELITE_USE_TARGETS=ON
     50    cd ..
     51done
     52
    3753#creation du lien symbolique
    38 ln -s $DIR build
    39 
    40 #creation project x86
    41 info "*************  Creating project for x86 *************"
    42 cd build
    43 rm -f CMakeCache.txt
    44 rm -rf CMakeFiles
    45 ${CMAKE} ../ -G "CodeLite - Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=${OECORE_CMAKE_HOST_TOOLCHAIN} -DCMAKE_CODELITE_USE_TARGETS=ON
    46 # -DCMAKE_BUILD_TYPE=Release
    47 
    48 #creation projet ARM
    49 info "************* Creating project for ARM *************"
    50 cd ..
    51 mkdir -p build_arm
    52 cd build_arm
    53 rm -f CMakeCache.txt
    54 rm -rf CMakeFiles
    55 
    56 ${CMAKE} ../ -G "CodeLite - Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=${OECORE_CMAKE_CROSS_TOOLCHAIN} -DCMAKE_CODELITE_USE_TARGETS=ON
    57 # -DCMAKE_BUILD_TYPE=Release
     54ln -s build_core2_64 build
Note: See TracChangeset for help on using the changeset viewer.