Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move CMake compile options to test builds #1115

Conversation

apcountryman
Copy link
Contributor

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 in FreeRTOS-Plus-TCP/test/build-combination/CMakeLists.txt. Note: the large comment block that was originally associated with the setting of compilation options in FreeRTOS-Plus-TCP/CMakeLists.txt was not moved to FreeRTOS-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:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

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.

@apcountryman apcountryman marked this pull request as ready for review March 13, 2024 17:49
@tony-josi-aws
Copy link
Member

@apcountryman

Thanks for taking time to contribute to the FreeRTOS+TCP

@moninom1 moninom1 self-requested a review March 14, 2024 04:46
@AniruddhaKanhere AniruddhaKanhere merged commit 8d95eaf into FreeRTOS:main Mar 14, 2024
10 checks passed
@apcountryman apcountryman deleted the move_cmake_compile_options_to_test_builds branch March 14, 2024 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants