Commit Graph

13 Commits

Author SHA1 Message Date
Gustavo Jose de Sousa b6a5052a97 waf: cmake: use CMakeConfig class instead of taskgen
That will make it easier to allow reconfiguration of cmake builds on a single
waf build run.
2016-05-25 11:51:40 -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 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
pkancir 85f0ef9265 waf : use LINKFLAGS for pthread
-pthread is the one supposed to be used because it defines pre-defined
macros as -lpthread doesn't, like was done in
2016-01-14 18:59:04 -02:00
khancyr 360d9fafb6 waf: force linking of phtread with gbenchmark
There is an issue with gbenchmark and waf on Ubuntu (15.04 and 15.10, ). Waf doesn't link pthread to gbenchmark and linking failed : 

````
[1652/1652] Linking build/linux/libraries/AP_Math/benchmarks/benchmark_matrix.linux
/home/khancyr/Workspace/APM/ardupilot/build/linux/gbenchmark/lib/libbenchmark.a(benchmark.cc.o): dans la fonction « benchmark::RunSpecifiedBenchmarks(benchmark::BenchmarkReporter*) »:
benchmark.cc:(.text+0x2e21): référence indéfinie vers « pthread_create »
/usr/bin/ld generated: référence indéfinie vers « pthread_create »
collect2: error: ld returned 1 exit status

Waf: Leaving directory `/home/khancyr/Workspace/APM/ardupilot/build/linux'
Build failed
 -> task in 'benchmark_matrix.linux' failed (exit status 1): 
    {task 139784788162576: cxxprogram benchmark_matrix.cpp.1.o -> benchmark_matrix.linux}
['/usr/lib/ccache/g++', '-Wl,--gc-sections', 'libraries/AP_Math/benchmarks/benchmark_matrix.cpp.1.o', '-o', '/home/khancyr/Workspace/APM/ardupilot/build/linux/libraries/AP_Math/benchmarks/benchmark_matrix.linux', '-Wl,-Bstatic', '-L.', '-lap', '-Wl,-Bdynamic', '-L/home/khancyr/Workspace/APM/ardupilot/build/linux/gbenchmark/lib', '-lm', '-lpthread', '-lrt', '-lbenchmark']
`````

Adding 'pthread' to env.LIB_GBENCHMARK solve the issue

see https://github.com/diydrones/ardupilot/pull/3460 and https://github.com/diydrones/ardupilot/issues/3461
2016-01-12 18:05:46 -02:00
Gustavo Jose de Sousa 41e2a8cf1e waf: gbenchmark: disable cross-compilation
That's a temporary solution to allow cross compilation for the common binaries.
We can enable cross compilation of benchmark later.
2016-01-11 16:31:59 -02:00
Gustavo Jose de Sousa 82a33399ef waf: gbenchmark: call _configure_cmake() in waf configuration
The cmake checks for gbenchmark need to run some code. Calling
_configure_cmake() only during build can potentially fail build. That would
happen in some cross-compilations for example.
2016-01-11 16:31:59 -02:00
Gustavo Jose de Sousa a31816c039 waf: gbenchmark: move cmake configuration to a separate function 2016-01-11 16:31:59 -02:00
Gustavo Jose de Sousa 7e8d25a56a waf: gbenchmark: use dict for cmake variables
That makes it easy to add new variables for the build system generation
command.
2016-01-11 16:31:59 -02:00
Gustavo Jose de Sousa f338b917d0 waf: gbenchmark: get build node from variant
If there's no variant configuration, then cfg.variant will be '', which will
make bldnode be cfg.bldnode. Thus, this patch prepare gbenchmark build for
variant builds and doesn't break the current build.
2016-01-05 10:21:42 -02:00
Gustavo Jose de Sousa f577c1702c waf: gbenchmark: catch WafError instead of Exception
Also, change the output.
2016-01-05 10:21:42 -02:00
Lucas De Marchi e9f4d4f1ed waf: use better and simpler syntax to find program
We can pass a list of possible binaries to find_program. This gives us a
better output while configuring:

	Checking for program 'ninja, ninja-build' : /usr/bin/ninja-build

instead of:

	Checking for program 'ninja'             : not found
	Checking for program 'ninja-build'       : /usr/bin/ninja-build
2015-12-23 10:20:17 -02:00
Gustavo Jose de Sousa 119948f263 waf: add gbenchmark Waf tool 2015-12-03 07:54:31 +11:00