Skip to content

Conversation

@RaiqaRasool
Copy link
Collaborator

This PR adds support for the CCDB_CACHE_ON CMake option by properly propagating it to the ccdb target via target_compile_definitions.

Previously, enabling the CCDB_CACHE_ON option at build time did not affect compilation because it wasn't forwarded to the compiler. This update adds the following logic to src/CCDB/CMakeLists.txt:

option(CCDB_CACHE_ON "Enable CCDB cache support" OFF)

if(CCDB_CACHE_ON)
    message(STATUS "Cache is ENABLED")
    target_compile_definitions(ccdb PUBLIC CCDB_CACHE_ON)
else()
    message(STATUS "Cache is DISABLED")
endif()

With this change, caching can be enabled at build time using:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=`pwd` -DCCDB_CACHE_ON=1

This ensures the cache logic is correctly compiled when the option is enabled.

@RaiqaRasool RaiqaRasool requested a review from DraTeots April 16, 2025 14:39
@DraTeots
Copy link
Contributor

Thank you so much for the changes!

@DraTeots DraTeots merged commit 0871e2f into v2-main Apr 16, 2025
2 checks passed
@DraTeots DraTeots deleted the rasool_addCcdbCacheOption branch April 16, 2025 14:52
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.

3 participants