Merge pull request #152 from Patater/cmake-subproject-fix
Enable use of Mbed TLS and Mbed Crypto as a CMake subproject
This commit is contained in:
commit
ee6f9b2a9f
7 changed files with 121 additions and 10 deletions
|
@ -218,6 +218,11 @@ cleanup()
|
|||
git update-index --no-skip-worktree Makefile library/Makefile programs/Makefile tests/Makefile
|
||||
git checkout -- Makefile library/Makefile programs/Makefile tests/Makefile
|
||||
|
||||
# Remove any artifacts from the component_test_cmake_as_subdirectory test.
|
||||
rm -rf programs/test/cmake_subproject/build
|
||||
rm -f programs/test/cmake_subproject/Makefile
|
||||
rm -f programs/test/cmake_subproject/cmake_subproject
|
||||
|
||||
if [ -f "$CONFIG_BAK" ]; then
|
||||
mv "$CONFIG_BAK" "$CONFIG_H"
|
||||
fi
|
||||
|
@ -1056,6 +1061,19 @@ component_test_cmake_out_of_source () {
|
|||
unset MBEDTLS_ROOT_DIR
|
||||
}
|
||||
|
||||
component_test_cmake_as_subdirectory () {
|
||||
msg "build: cmake 'as-subdirectory' build"
|
||||
MBEDTLS_ROOT_DIR="$PWD"
|
||||
|
||||
cd programs/test/cmake_subproject
|
||||
cmake .
|
||||
make
|
||||
if_build_succeeded ./cmake_subproject
|
||||
|
||||
cd "$MBEDTLS_ROOT_DIR"
|
||||
unset MBEDTLS_ROOT_DIR
|
||||
}
|
||||
|
||||
component_test_zeroize () {
|
||||
# Test that the function mbedtls_platform_zeroize() is not optimized away by
|
||||
# different combinations of compilers and optimization flags by using an
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue