Commit Graph

2081 Commits

Author SHA1 Message Date
Gustavo Jose de Sousa 32402b93af waf: ardupilotwaf: remove SITL from common libraries
Only SITL port uses it and using it for PX4 raises compilation errors.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 03c067921e waf: ardupilotwaf: allow extra features for ap_program and ap_stlib
That allows tweak programs and static libraries builds for different
configurations.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 12946db4dc waf: ardupilotwaf: remove common_features()
The function ap_program() was the only one that was using it, so let's just
inline it. Besides, the name was misleading, since the (only) feature added was
for programs instead of general task generators.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 9c5593ef09 waf: ardupilotwaf: don't use common_features() unnecessarily
That function is already used in ap_program().
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 8664c0344d waf: allow boards to tweak build
We define a function build() that can be overrode by Board subclasses.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 1fe795f283 waf: boards: set Board as an abstract board
Let's have a unified way to do that - no need for checking the board name
anymore.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 93156e4325 waf: boards: allow defining abstract boards
That avoids instantiation of wrong board classes and also listing invalid board
names in the help message.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa b53f38bb02 waf: boards: cache board in a variable
That allows subsequent calls to get_board() to work nicely, with no need of
instantiating a board on every single call.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 36b49debf6 waf: boards: allow defining board name
If the name is not defined, then the class name will be used.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 4f55c75767 waf: boards: pass configure context to configure_env()
There will be cases when the configuration context will be needed.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 2f324c056f waf: cmake: live output!
Waf buffers command output and spit it after the command is done. For external
builds, that might give the wrong impression that the build stalled.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 1f60e9e3e8 waf: cmake: refactor methods to accept cmake_config parameter
That makes methods more flexible for use.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa b0e7fe26d5 waf: cmake: fix target processing for cmake_build
Accept passing a single Node object to target option.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 07700a821c waf: cmake: add method get_cmake_bldnode()
That allows a user to have access to the cmake build node before the configure
task generator is posted.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa b077613f28 waf: cmake: use BLUE color for cmake tasks 2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 03146c5d15 waf: cmake: move cmake build task creation to a function
That enables other tools to create the task directly.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 049abec55b waf: cmake: add keyword parameter cmake_output_patterns 2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 4f82120c8f waf: cmake: improve documentation regarding target option
That feature can also be used within wscripts with no problem. The code added
in the example shows that.
2016-03-14 11:54:29 -03:00
Grant Morphett 0d9a3840d8 autotest: Added submodule update and removed old modules update
Firstly build.All was failing as the submodules had not been updated
so the 'git submodule update' in this commit resovles that.
Secondly, now that the dependant projects like PX4Firmware etc are git
submodules of ardupilot we no longer need to check them out separately
and update them so I have removed all those.
I left MAVProxy as it isn't a submodule of ardupilot.
2016-03-08 11:40:48 +11:00
Gustavo Jose de Sousa 86c1c6da5c waf: fix environment boolean values
It is more natural to use `env.FOO = True` then `env.foo = [True]`.
2016-03-03 14:58:03 -03:00
Gustavo Jose de Sousa 79b724dce8 waf: ardupilotwaf: fix board env processing
Two things are fixed with this patch:
    1. We sort dictionaries' keys if they aren't OrderedDict instances. Since
    dict objects don't guarantee order, environment variables may have contents
    in wrong order, causing unnecessary rebuilds.
    2. We only use prepend_value() if there's already a value set for the key
    and that value is list. Before this change, boards couldn't set
    non-iterable values.
2016-03-03 14:58:03 -03:00
Lucas De Marchi cca8a86962 Tools: Use GCC 4.9 as an Ubuntu prereq
This should actually use the install-prereq script so we don't duplicate
effort on the maintenance of these scripts. But let's at least install
the correct version for now.
2016-02-29 17:00:27 -03:00
Fredrik Hedberg e88e8835b1 Tools: Use GCC 4.9 as an Ubuntu prereq as older version is no longer available. 2016-02-29 16:58:48 -03:00
Gustavo Jose de Sousa 1233022c78 waf: cmake: synchronize cmake build tasks of same configuration
Running cmake build tasks of the same configuration in parallel my cause race
condition.
2016-02-27 03:15:45 -03:00
Gustavo Jose de Sousa 8734432196 waf: ardupilotwaf: don't use Node object for ap_program target
That will make platform specific naming be ignored. We use a string instead, to
let Waf tweak the target name correctly for us. The '#' prefix is to tell Waf
that the path is relative to bld.bldnode (instead of bld.path, which is the
default).
2016-02-27 03:13:08 -03:00
Staroselskii Georgii 1107190656 waf: boards: add navio2 2016-02-27 03:06:50 -03:00
Andrew Tridgell 15945c50cb scripts: ensure we have clean build for px4 2016-02-24 19:33:16 +11:00
Gustavo Jose de Sousa 181b6f5c2e waf: cmake: do a clean configuration
We need to remove CMakeCache.txt, otherwise cached variables would remain the
old value when they are removed from cmake_vars parameter.

We use `os.remove()` instead of `Node.delete()` because the latter removes the
node instance from its parent's children list. That makes the node be ignored
when storing persistent information after the build, thus the node signature
wouldn't be saved with that approach, which would make waf always think that
the task should be executed.
2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa eacf9d8a0e waf: cmake: declare CMAKE_BLD_DIR as a value dependency
Since we set that value to the task's cwd property, we need to declare it as a
value dependency of cmake_configure_task.
2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa 6c914349d0 waf: cmake: define proper uid() functions
The default implementation takes into account the task's output and input
nodes. That isn't very well applicable for cmake tasks, so we define proper
uid() methods.
2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa b5f20459e7 waf: cmake: set CMakeCache.txt as output of cmake_configure task
That provides the behavior we implemented in runnable_status(). Thus, we don't
have to override that method anymore.
2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa ed288ed345 waf: cmake: ensure order of cmake_vars
We need to ensure the order in which the variables are defined to avoid
unnecessary execution of the configuration task.
2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa c609b27afc waf: gbenchmark: use cmake tool
A little addition in the root wscript was also necessary.
2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa e883242c31 waf: cmake: add Waf tool 2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa 38da32853a ci: use --enable-benchmarks in waf configure 2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa 662e45fda2 waf: move --check-verbose option declaration
We move it to the correct "scope", that is, ardupilotwaf.py, where it's really
used.
2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa 8c4d4f3f2a waf: make options groups accessible for any tool
That allows options being declared where they're really used. Additionally, we
load ardupilotwaf after the other tools so that we can create our groups after
all non-ardupilot option groups are created. That makes our groups appear as
the last ones in the help message, which makes it easier to locate them.
2016-02-22 15:36:48 -03:00
Kevin Guest 17378bd42a autotest: Add Rotherham 2016-02-22 16:21:16 +11:00
Andrew Tridgell 119cf6bb13 ci: added sitltest target
this adds some basic SITL testing to our CI
2016-02-22 12:34:32 +11:00
Gustavo Jose de Sousa 898c2faaab waf: git_submodule: fix uid() method for python3
Python3's hashlib.md5() requires Unicode-objects to be encoded before hashing.
2016-02-19 20:28:03 -02:00
Lucas De Marchi 15ce176818 waf: add -Wundef to all boards 2016-02-19 12:34:24 -02:00
Lucas De Marchi f0277cecb4 waf: ignore -Wundef for gtest
The gtest header uses lots of undefined macros, showing lots of warnings
if we enable -Wundef. Ideally we could use a #pragma to ignore the
warning only from the correct header, but this currently doesn't work
with g++ - see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431

So for now we disable the warning completely when compiling gtest or any
test that uses its header.

Thanks Gustavo Sousa
2016-02-19 12:34:24 -02:00
Gustavo Jose de Sousa 393bea8945 waf: boards: use classes for boards definition
In order to provide board-specific behavior. For example, the incoming PX4
build will require custom build behavior.
2016-02-18 14:33:46 -02:00
Lucas De Marchi a01b933cb9 waf: add missing warnings from AP_Common.h
Copy the missing warnings from AP_Common.h and reorder the warnings to
be more clear on intent. This will later let us remove the warnings from
the header.
2016-02-12 20:41:29 +11:00
Gustavo Jose de Sousa 7259ac33f0 waf: git_submodule: override uid()
By running waf with option -v, waf was complaining about the update_submodule
tasks having the same identifier. That happened because the default uid()
method depended on the class name, inputs and outputs. Since this type of task
doesn't have input nor output file, we need to override uid() so that it uses
the submodule path for the task identifier.
2016-02-11 17:08:35 -02:00
Randy Mackay 898673f5e8 web-firmware: fix link to companion computer images 2016-02-08 14:22:37 +09:00
Randy Mackay 434fe919d6 web-firmware: add link to companion computer images 2016-02-08 10:19:19 +09:00
Gustavo Jose de Sousa 8655fdfd7f waf: use git_submodule tool through GIT_SUBMODULES variable
With this change, there's no need to verify if the submodule is initialized,
because the submodules in GIT_SUBMODULES are automatically initialized and
updated if necessary before the build tasks are performed.

One downside of this change is that Google Benchmark configuration is now done
only during build. However that is minor, since now there are easy ways to
separately build different targets and program groups, so that a fail in
benchmark build doesn't really affect the other targets.
2016-02-06 10:25:08 -02:00
Gustavo Jose de Sousa fdc87df074 waf: create taskgen for gtest in _build_common_taskgens
So that it belongs to 'build' group.
2016-02-06 10:25:08 -02:00
Gustavo Jose de Sousa 049feb3e9e waf: git_submodule: add git_submodule tool 2016-02-06 10:25:08 -02:00