Fix AFR_ENABLE_DEMOS in CMake GUI
@@ -63,7 +63,8 @@ option(AFR_ENABLE_DEMOS "Build demos for Amazon FreeRTOS." ON)
# Provide an option to enable tests. Also set an helper variable to use in generator expression.
option(AFR_ENABLE_TESTS "Build tests for Amazon FreeRTOS. Requires recompiling whole library." OFF)
if(AFR_ENABLE_TESTS)
- set(AFR_ENABLE_DEMOS 0 CACHE INTERNAL "") # Turning off demo when tests are enabled.
+ # Turning off demo when tests are enabled.
+ set(AFR_ENABLE_DEMOS 0 CACHE BOOL "Build demos for Amazon FreeRTOS." FORCE)
add_compile_definitions(AMAZON_FREERTOS_ENABLE_UNIT_TESTS)
add_compile_definitions(IOT_BUILD_TESTS=1)
set(AFR_IS_TESTING 1 CACHE INTERNAL "")
