Generate cpp_cummy_build.cpp dynamically

Generate programs/test/cpp_dummy_build.cpp dynamically instead of
maintaining it manually. This removes the need to update it when the list of
headers changes.

Include all the headers unconditionally except for the ones that cannot be
included directly.

Support this dynamic generation both with make and with cmake.

Adapt all.sh accordingly. Remove the redundant C build from
component_build_default_make_gcc_and_cxx (it was also done in
component_test_default_out_of_box), leaving a component_test_make_cxx. Also
run the C++ program, because why not. Do this in the full configuration
which may catch a bit more problems in headers.

Fixes #2570 for good.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine
2021-07-09 15:19:28 +02:00
parent 7238503642
commit 03ab544832
6 changed files with 109 additions and 116 deletions

1
programs/.gitignore vendored
View File

@@ -56,6 +56,7 @@ ssl/ssl_server
ssl/ssl_server2
test/benchmark
test/cpp_dummy_build
test/cpp_dummy_build.cpp
test/ecp-bench
test/query_compile_time_config
test/selftest