diff --git a/programs/test/cmake_package/CMakeLists.txt b/programs/test/cmake_package/CMakeLists.txt index 019e6e7c0..f498cf931 100644 --- a/programs/test/cmake_package/CMakeLists.txt +++ b/programs/test/cmake_package/CMakeLists.txt @@ -13,7 +13,9 @@ execute_process( "-H${MbedTLS_SOURCE_DIR}" "-B${MbedTLS_BINARY_DIR}" "-DENABLE_PROGRAMS=NO" - "-DENABLE_TESTING=NO") + "-DENABLE_TESTING=NO" + # Turn on generated files explicitly in case this is a release + "-DGEN_FILES=ON") execute_process( COMMAND "${CMAKE_COMMAND}" diff --git a/programs/test/cmake_package_install/CMakeLists.txt b/programs/test/cmake_package_install/CMakeLists.txt index 6070a6c06..6937af4f6 100644 --- a/programs/test/cmake_package_install/CMakeLists.txt +++ b/programs/test/cmake_package_install/CMakeLists.txt @@ -15,6 +15,8 @@ execute_process( "-B${MbedTLS_BINARY_DIR}" "-DENABLE_PROGRAMS=NO" "-DENABLE_TESTING=NO" + # Turn on generated files explicitly in case this is a release + "-DGEN_FILES=ON" "-DCMAKE_INSTALL_PREFIX=${MbedTLS_INSTALL_DIR}") execute_process( diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index ddabe12bd..41cd13953 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -5222,8 +5222,13 @@ support_test_cmake_as_subdirectory () { } component_test_cmake_as_package () { + # Remove existing generated files so that we use the ones CMake + # generates + make neat + msg "build: cmake 'as-package' build" cd programs/test/cmake_package + # Note: Explicitly generate files as these are turned off in releases cmake . make ./cmake_package @@ -5233,8 +5238,13 @@ support_test_cmake_as_package () { } component_test_cmake_as_package_install () { + # Remove existing generated files so that we use the ones CMake + # generates + make neat + msg "build: cmake 'as-installed-package' build" cd programs/test/cmake_package_install + # Note: Explicitly generate files as these are turned off in releases cmake . make ./cmake_package_install