CMake build broken with custom config using p256-m or everest #8165
Labels
bug
component-platform
Portability layer and build scripts
size-xs
Estimated task size: extra small (a few hours at most)
Summary
When using CMake, the build fails when using a “3rdparty” feature (everest, p256-m) that is activated by any means other than editing
include/mbedtls/mbedtls_config.h
:mbedtls/mbedtls_config.h
earlier in the include path;MBEDTLS_CONFIG_FILE
;MBEDTLS_USER_CONFIG_FILE
;Details
Steps to reproduce:
Expectation: the build succeeds.
Actual result: a linking failure, because the files in
3rdparty/p256-m
are not built or linked.The problem is visible in
3rdparty/CMakeLists.txt
: the subdirectories are only traversed ifThis only works if the configuration is the one in
include/mbedtls/mbedtls_config.h
. It doesn't work when the respective options are enabled because the build has a differentmbedtls/mbedtls_config.h
earlier in the include path, or the build definesMBEDTLS_CONFIG_FILE
, or the build definesMBEDTLS_USER_CONFIG_FILE
, or the options are enabled directly on the compiler command line.A tempting fix is to traverse the
3rdparty
directories unconditionally, but I don't know if that causes some breakage (why didn't we do that in the first place?).The text was updated successfully, but these errors were encountered: