You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want our public headers to work in C++. For the most part, this means our headers should contain balanced extern { … } blocks. It also means public headers must refrain from things that don't work in C++, such as using new as a variable name, using forward-defined structures as a return type, etc.
Our testing is currently limited to one program (cpp_dummy_build) that just includes all headers, which we build in the full configuration with Clang in non-pedantic mode. The goal of this task is to extend the build of cpp_dummy_build to most all.sh components.
Create a header file that includes all the public headers. Location and method TBD. The most obvious thing is that this should be a generated file. However, having a header file that's generated adds additional complexity to the build scripts; currently we don't have any. Since we don't often add public headers, it may be better to let this file be maintained manually; but if we do that, we should keep a script that checks its content.
Note that “all the public headers” must exclude a few headers that can't be excluded independently. As of 3.5.0, this means headers matching /[-_.\/]config[-_.]/ (i.e. containing config as a word). Some psa/crypto_*.h such as psa/crypto_values.h are not meant to be included independently, but they do work as of 3.5.0, so they don't need to be excluded.
Change cpp_dummy_build.cpp to be a committed file that includes all_headers.h.
We want our public headers to work in C++. For the most part, this means our headers should contain balanced
extern { … }
blocks. It also means public headers must refrain from things that don't work in C++, such as usingnew
as a variable name, using forward-defined structures as a return type, etc.Our testing is currently limited to one program (
cpp_dummy_build
) that just includes all headers, which we build in thefull
configuration with Clang in non-pedantic mode. The goal of this task is to extend the build ofcpp_dummy_build
to mostall.sh
components./[-_.\/]config[-_.]/
(i.e. containingconfig
as a word). Somepsa/crypto_*.h
such aspsa/crypto_values.h
are not meant to be included independently, but they do work as of 3.5.0, so they don't need to be excluded.cpp_dummy_build.cpp
to be a committed file that includesall_headers.h
.make
andcmake
to automatically buildcpp_dummy_build.cpp
if a C++ compiler is available. Use pedantic flags as much as possible (but not pedantic flags that break the build — that would be a separate issue, such as Unable to build simple c++ example with Visual Studio 15 2017 #7087 or the use of a flexible array member).Out of scope:
cpp_dummy_build
to do more than include all the headers.The text was updated successfully, but these errors were encountered: