Last change
on this file since 110 was 46, checked in by Thomas Fuhrmann, 8 years ago |
Add the mavlink branch
|
-
Property svn:executable
set to
*
|
File size:
1.2 KB
|
Rev | Line | |
---|
[12] | 1 | DIR=build_$(uname -m)
|
---|
| 2 |
|
---|
[46] | 3 | function replace_cxx_flags () {
|
---|
| 4 | cmake_version=$(cmake --version)
|
---|
| 5 | cmake_version_number=$(expr match "$cmake_version" '.*\([0-9]\.[0-9]*\.[0-9]*\)')
|
---|
| 6 | first_digit=$(expr match "$cmake_version_number" '\([0-9]*\)')
|
---|
| 7 | second_digit=$(expr match "$cmake_version_number" '.*\.\([0-9]*\)\..*')
|
---|
| 8 | if [ "$first_digit" -ge "3" ] || [ "$second_digit" -ge "4" ]; then
|
---|
| 9 | find . -name build.make -type f -exec sed -i 's/CXX_FLAGS/CXX_FLAGS) $(CXX_INCLUDES/g' {} \;
|
---|
| 10 | fi
|
---|
| 11 | }
|
---|
| 12 |
|
---|
[12] | 13 | #verifie l'existence du lien symbolique build
|
---|
| 14 | if [ -d build ];then
|
---|
| 15 | if ! readlink build > /dev/null ; then
|
---|
| 16 | #it is a directory, exit to do not erase anything
|
---|
| 17 | err "Error: build already exsits and is a directory; it should be a symlink."
|
---|
| 18 | exit 1
|
---|
| 19 | fi
|
---|
| 20 | if ! readlink build | grep -w $DIR >/dev/null; then
|
---|
| 21 | echo "Warnink, build was pointing to another directory."
|
---|
| 22 | fi
|
---|
| 23 | rm build
|
---|
| 24 | fi
|
---|
| 25 |
|
---|
| 26 | #creation du repertoire
|
---|
| 27 | mkdir -p $DIR
|
---|
| 28 | #creation du lien symbolique
|
---|
| 29 | ln -s $DIR build
|
---|
| 30 |
|
---|
| 31 | #creation project x86
|
---|
| 32 | cd build
|
---|
| 33 |
|
---|
| 34 | rm -f CMakeCache.txt
|
---|
| 35 | rm -rf CMakeFiles
|
---|
| 36 | cmake ../ -G "CodeBlocks - Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=${OECORE_CMAKE_HOST_TOOLCHAIN}
|
---|
[46] | 37 | replace_cxx_flags
|
---|
Note:
See
TracBrowser
for help on using the repository browser.