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

fix(lct): fix setting LCT cmake var through LCI cmake var. #57

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions lct/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
option(LCT_DEBUG "Enable LCT debug mode" OFF)
if(LCI_DEBUG)
set(LCT_DEBUG ON)
endif()
set(LCT_CACHE_LINE
64
CACHE STRING "LCT: Size of cache line (bytes)")
if(LCI_CACHE_LINE)
set(LCT_CACHE_LINE)
endif()
option(LCT_CONFIG_USE_ALIGNED_ALLOC "Enable memory alignment" ON)
function(lct_option option type description default)
# If the corresponding LCI_option is defined, just use it. Otherwise, use the
# default value.
if(LCI_${option})
set(LCT_${option}
${LCI_${option}}
CACHE ${type} ${description})
else()
set(LCT_${option}
${default}
CACHE ${type} ${description})
endif()
endfunction()

lct_option(DEBUG BOOL "Enable LCT debug mode" OFF)
lct_option(CACHE_LINE STRING "LCT: Size of cache line (bytes)" 64)
lct_option(CONFIG_USE_ALIGNED_ALLOC BOOL "Enable memory alignment" ON)

add_subdirectory(data_structure)

Expand Down