Skip to content
Snippets Groups Projects
Commit ccf42002 authored by Martin Hoffmann's avatar Martin Hoffmann Committed by Gerrit Code Review
Browse files

Coding guideline: Added editorconfig

Feel free to use editorconfig together with the according
emacs/vi/sublime plugin.

Silently removed old gen_build_env.

Put /usr/include to cppcheck include paths, as we
are actually using these headers in i386..
(Should we really do that?!)

Change-Id: I31666c088f2d1a6c0f2f3a99af1af35d52d2767f
parent 701b9bf5
No related branches found
No related tags found
No related merge requests found
root = true
[*]
end_of_line = LF
charset = utf-8
[*.cc]
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 80
[*.c]
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 80
[*.h]
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 80
[*.py]
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 80
#!/bin/bash
#
# Helper script generate a build environment.
#
# !!! Call the script from within your out-of-source build dir !!!!
#
# author: Martin Hoffmann, Peter Ulbrich
#
#set -x
echo "============================"
echo "Generating Build Environment"
echo "============================"
echo ""
# Get repository base dir from script location
REPODIR=$(dirname $0)/
GENERATOR="Unix Makefiles"
if [ "$2" == "eclipse" ]
then
GENERATOR="Eclipse CDT4 - Unix Makefiles"
fi
if [ "$2" == "ninja" ]
then
GENERATOR="Eclipse CDT4 - Ninja"
fi
if [ "$1" == "i386" ]
then
ARCH=i386
elif [ "$1" == "posix" ]
then
ARCH=posix
else
# Default Architecture i386
ARCH=i386
echo "Default architecture: $ARCH"
fi
# Call cmake appropriately
if [ $ARCH ]
then
echo "Setting up build environment [$ARCH]:"
cmake $REPODIR -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_TOOLCHAIN_FILE="$REPODIR/toolchain/$ARCH.cmake" -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "${GENERATOR}"
# We call cmake twice, as the crosscompiler linking does not work otherwise. Don't know why yet..
# cmake $REPODIR
else
echo "Currently supported:"
echo " * i386"
echo " * posix"
echo "Per default an Eclipse Makefile project file is generated."
echo "To change to Ninja add 'ninja' as second parameter. (Needs cmake >= 2.8.9 !)"
echo ""
echo "Usage: "
echo " $0 [i386,posix] <ninja>"
echo ""
exit 1
fi
......@@ -16,10 +16,10 @@ if(CPPCHECK)
foreach(dir ${INCLUDEDIRS})
file(APPEND ${CPPINCLUDES} "${dir}\n")
endforeach()
if(BUILD_posix)
# if(BUILD_posix)
file(APPEND ${CPPINCLUDES} "/usr/include\n")
file(APPEND ${CPPINCLUDES} "/usr/include/linux\n")
endif()
# endif()
add_custom_target( cppcheck
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment