From da96c6d1d0c2d6b8444483404a6fe506dbb6e8f1 Mon Sep 17 00:00:00 2001 From: ipython3 Date: Wed, 13 Aug 2025 22:50:37 +0800 Subject: [PATCH] iox-#2485 Force update dependent options Use `set(... CACHE BOOL "" FORCE)` to ensure the cache is updated so these options are truly enabled --- doc/website/release-notes/iceoryx-unreleased.md | 1 + iceoryx_meta/build_options.cmake | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/website/release-notes/iceoryx-unreleased.md b/doc/website/release-notes/iceoryx-unreleased.md index e45bcc171b..1dfac30cca 100644 --- a/doc/website/release-notes/iceoryx-unreleased.md +++ b/doc/website/release-notes/iceoryx-unreleased.md @@ -160,6 +160,7 @@ - Fix call to non-existing `getService` in channel.inl [#2426](https://github.com/eclipse-iceoryx/iceoryx/issues/2426) - Fix chunk management race condition causing failed management allocation [#2440](https://github.com/eclipse-iceoryx/iceoryx/issues/2440) - Fix compile error with GCC 8 [#2480](https://github.com/eclipse-iceoryx/iceoryx/issues/2480) +- Fix cmake cache inconsistency [#2485](https://github.com/eclipse-iceoryx/iceoryx/issues/2485) **Refactoring:** diff --git a/iceoryx_meta/build_options.cmake b/iceoryx_meta/build_options.cmake index c3fb6f0a04..0e7c470964 100644 --- a/iceoryx_meta/build_options.cmake +++ b/iceoryx_meta/build_options.cmake @@ -44,21 +44,21 @@ option(IOX_ROUDI_DEFAULT_MONITORING_MODE "Enable roudi monitoring mode by defaul set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # "Create compile_commands.json file" if(BUILD_ALL) - set(EXAMPLES ON) - set(BUILD_TEST ON) - set(INTROSPECTION ON) - set(BINDING_C ON) + set(EXAMPLES ON CACHE BOOL "" FORCE) + set(BUILD_TEST ON CACHE BOOL "" FORCE) + set(INTROSPECTION ON CACHE BOOL "" FORCE) + set(BINDING_C ON CACHE BOOL "" FORCE) endif() ## must be before the BUILD_TEST check if(COVERAGE AND NOT BUILD_TEST) - set(BUILD_TEST ON) + set(BUILD_TEST ON CACHE BOOL "" FORCE) set(BUILD_TEST_HINT "${BUILD_TEST_HINT} (activated by COVERAGE=ON)") endif() if(BUILD_TEST AND NOT ROUDI_ENVIRONMENT) set(ROUDI_ENV_HINT "${ROUDI_ENV_HINT} (activated by BUILD_TEST=ON)") - set(ROUDI_ENVIRONMENT ON) + set(ROUDI_ENVIRONMENT ON CACHE BOOL "" FORCE) endif() if(CCACHE)