Changeset 68 in flair-dev for trunk/scripts/cmake_codelite.sh
- Timestamp:
- Mar 6, 2018, 12:14:17 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/cmake_codelite.sh
r43 r68 1 DIR=build_$(uname -m) 1 #!/bin/bash 2 2 3 3 function info () { … … 14 14 } 15 15 16 if [ $(uname -m) != "x86_64" ]; then 17 err "unsupported host architecture, you need a x86_64 cpu" 18 fi 19 16 20 if ! [ -f ./CMakeLists.txt ]; then 17 21 err "Current directory does not contain CMakeLists.txt" … … 27 31 err "Error: build already exsits and is a directory; it should be a symlink." 28 32 fi 29 if ! readlink build | grep -w $DIR>/dev/null; then33 if ! readlink build | grep -w build_core2_64 >/dev/null; then 30 34 warn "Warnink, build was pointing to another directory." 31 35 fi … … 33 37 fi 34 38 35 #creation du repertoire 36 mkdir -p $DIR 39 #iterate over available toolchains 40 toolchains=($OECORE_CMAKE_TOOLCHAINS) 41 for 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 .. 51 done 52 37 53 #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 54 ln -s build_core2_64 build
Note:
See TracChangeset
for help on using the changeset viewer.