Skip to content

Commit 0871e2f

Browse files
authored
Merge pull request #103 from JeffersonLab/rasool_addCcdbCacheOption
Add support for CCDB_CACHE_ON option in CMakeLists
2 parents 3f192f2 + 9861d79 commit 0871e2f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

cpp/src/CCDB/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ add_library(ccdb SHARED
3030
target_include_directories(ccdb PUBLIC "${PROJECT_SOURCE_DIR}/..")
3131
set_target_properties(ccdb PROPERTIES POSITION_INDEPENDENT_CODE ON)
3232

33+
option(CCDB_CACHE_ON "Enable CCDB cache support" OFF)
34+
35+
if(CCDB_CACHE_ON)
36+
message(STATUS "Cache is ENABLED")
37+
target_compile_definitions(ccdb PUBLIC CCDB_CACHE_ON)
38+
else()
39+
message(STATUS "Cache is DISABLED")
40+
endif()
41+
3342
# Add SQLITE3
3443
find_package (SQLite3 REQUIRED)
3544
if (SQLite3_FOUND)

0 commit comments

Comments
 (0)