fix(cmake): Set CACHE variables correctly

The syntax for setting cache variables is actually
set(<variable> <value> CACHE <type> <docstring>) and not
set(<variable> CACHE <type> <value>).

The previous code silently set the variables to the empty string.
This commit is contained in:
Ferdinand Bachmann
2026-01-13 15:19:43 +01:00
parent 35e0c8a343
commit 56c3be2604
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -124,11 +124,11 @@ if(CONFIG_MBEDTLS_CERTIFICATE_BUNDLE)
endif()
# Only build mbedtls libraries
set(ENABLE_TESTING CACHE BOOL OFF)
set(ENABLE_PROGRAMS CACHE BOOL OFF)
set(ENABLE_TESTING OFF CACHE BOOL "mbedtls: enable testing")
set(ENABLE_PROGRAMS OFF CACHE BOOL "mbedtls: enable programs")
# Use pre-generated source files in mbedtls repository
set(GEN_FILES CACHE BOOL OFF)
set(GEN_FILES OFF CACHE BOOL "mbedtls: use pre-generated source files")
# Make sure mbedtls finds the same Python interpreter as IDF uses
idf_build_get_property(python PYTHON)
@@ -19,11 +19,11 @@ idf_component_register(SRCS "${srcs}"
PRIV_REQUIRES "${priv_requires}")
# Only build mbedtls libraries
set(ENABLE_TESTING CACHE BOOL OFF)
set(ENABLE_PROGRAMS CACHE BOOL OFF)
set(ENABLE_TESTING OFF CACHE BOOL "mbedtls: enable testing")
set(ENABLE_PROGRAMS OFF CACHE BOOL "mbedtls: enable programs")
# Use pre-generated source files in mbedtls repository
set(GEN_FILES CACHE BOOL OFF)
set(GEN_FILES OFF CACHE BOOL "mbedtls: use pre-generated source files")
# Needed to for include_next includes to work from within mbedtls
include_directories("${COMPONENT_DIR}/port/include")