Make it use rsync command. That's a workaround to allow user using --upload
option, which in fact appends the 'rsync' to the command chain. A bad
side-effect of this is that the build summary is output twice for a command
like 'waf copter --upload'.
Differentiating if the path should be relative to the build dir or the
ROMFS dir based purely on the type of the item is not a good approach.
This prepares the way to have more files on ROMFS with different names
on src and dst.
Yes, we know we are using them. Remove warnings like:
CMake Deprecation Warning at /usr/share/cmake/Modules/CMakeForceCompiler.cmake:93 (message):
The CMAKE_FORCE_CXX_COMPILER macro is deprecated. Instead just set
CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
cmake/toolchains/Toolchain-arm-none-eabi.cmake:37 (cmake_force_cxx_compiler)
/home/lucas/p/dronecode/ardupilot/build/px4-v2/modules/PX4Firmware/CMakeFiles/3.6.2/CMakeSystem.cmake:6 (include)
CMakeLists.txt:204 (project)
We currently are unable to build on MacOSX unless we give waf the
--check-cxx-compiler g++. Change the compiler order to search for
gcc/g++ first instead of clang/clang++.
When we are checking if a header is available we can't pass -I argument
to our missing/ directory. Otherwise we would end up telling the build
that a header is available when it actually isn't.
This fixes the build of sitl in MacOS with clang.
On Windows, using MSYS Makefiles generator doesn't work very well when the
CMakeLists.txt files use custom commands with paths as arguments. Furthermore,
MinGW Makefiles generator can't be used if sh.exe is in the system's path and
some build systems rely on sh for certain tasks (which is the case of PX4
Firmware build). Because of that, the list of generators for Windows has been
narrowed to Ninja and NMake Makefiles.
Here we do the following:
1) Move the pkg-config check to boards.py so we only check of it for
linux boards
2) Use cfg.find_toolchain_program() if possible, for example, for AR
That's more correct than setting Waf environment variables:
(1) We don't need to worry about differences between OSes - the previous
implementation was actually broken for Windows because the program names in
the environment variables were missing the ".exe" extension.
(2) That looks better than looping over possible compiler names and running
the configuration transactionally multiple times.
Implicit dependency scanning takes significant time and, since it doesn't
produce files, it's okay to keep the resulting information across clean
commands as long as the scanner is triggered again if there's need to. This
commit accomplishes that.
The advantage of this approach can be observed by the following timings when
building the group "bin":
Method Time
------------------------------------------------------------------------
Fully clean build 5m18.633s
Clean build with scanning result persisted 4m23.346s
Clean build with ccache but non-persistent scan results 1m40.125s
Clean build with scanning results persisted and with ccache 14.843s
While at it, move management of information persisted across clean commands to
a separate module.
That makes more sense, since that module is supposed to have basic Ardupilot
specific features. The root wscript should be a mere user of those features.
This approach is better then the previous one mainly because the latter
required creating the task generator for the checks in a separate group and
posting that target implied in posting the whole previous build groups.
Some notes:
- This is implemented so that headers aren't checked more than once, so there
might be some checking tasks that won't do anything because the headers are
checked on another task. Even so, those headers are added to the result of
scan() in order to provide a consistent output to the user.
- It is safe manipulating the shared variable dispatched_headers because the
scan() is called before the task is added to the execution queue.
- Although we force ap_library_check_headers.scan() to always be called,
that's OK, because we use the scanning result of the compilation task, which
returns a cached value if there's no need to rescan.
That way we avoid recompiling source files that don't depend on vehicles.
Change notes:
- UTILITY_SOURCE_EXTS: moved to ap_library
- Task generators indexes: ap_library handles that now and in a better way
- Use of AP_STLIB_FEATURES: it doesn't make sense anymore, since the stlib
taskgen has empty source list
- Flags and defines: passed down to ap_library through AP_LIBRARIES_OBJECTS_KW
- Set use='mavlink' in AP_LIBRARIES_OBJECTS_KW instead of calls to
bld.ap_stlib().
That's a tool for creating task generators for libraries object files. One of
the key objectives of this patch is to provide a way to avoid recompiling
sources that are independent of vehicles.
This fix a bug introduced by 06a5156 ("waf: px4: reconfigure PX4Firmware for
each program"), with the removal of the call fw_task.set_run_after(cp_lib).
Provide a function to register a post build routine to do the warnings. Do that
way so that the user can chose when to add the callback to the build (i.e.
allow the user to assert a desired order for the post build callbacks to be
called).
This allows to completely disable the tests. Even the gtest submodule is
not checked out allowing integration on build servers without needing to
download one more submodule.
This is different from the --notests flag. The latter only disables
executing the tests, but always use the submodule.