Move CMake compile options to test builds #1115
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
As originally discussed in the FreeRTOS Forums,
FreeRTOS-Plus-TCP/CMakeLists.txt
currently sets the compile options used to build FreeRTOS-Plus-TCP and its dependencies which can cause problems if the compiler used by a consumer of FreeRTOS-Plus-TCP doesn't support some of these compilation options, or these compilation options trigger compilation errors. A similar problem in FreeRTOS-Kernel was addressed by FreeRTOS/FreeRTOS-Kernel#872.This PR removes the setting of compile options from
FreeRTOS-Plus-TCP/CMakeLists.txt
to ensure that consumers of FreeRTOS-Plus-TCP are not impacted. The compile options tested by the CI build tests are now set inFreeRTOS-Plus-TCP/test/build-combination/CMakeLists.txt
. Note: the large comment block that was originally associated with the setting of compilation options inFreeRTOS-Plus-TCP/CMakeLists.txt
was not moved toFreeRTOS-Plus-TCP/test/build-combination/CMakeLists.txt
since it didn't seem relevant to the new approach.Test Steps
This change was tested by executing the instructions from https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/test/build-combination/README.md#unix-linux-and-mac (reproduced below for reference) on an Ubuntu 20.04 machine.
cmake -S . -B build -DFREERTOS_PLUS_TCP_TEST_CONFIGURATION=ENABLE_ALL cmake --build build --target freertos_plus_tcp_build_test
cmake -S . -B build -DFREERTOS_PLUS_TCP_TEST_CONFIGURATION=DISABLE_ALL cmake --build build --target freertos_plus_tcp_build_test
cmake -S . -B build -DFREERTOS_PLUS_TCP_TEST_CONFIGURATION=DEFAULT_CONF cmake --build build --target freertos_plus_tcp_build_test
The "I have tested my changes..." checklist item has not been marked since this repository's GitHub actions have not been run yet.
Checklist:
Related Issue
None.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.