diff options
| author | Mark Rowe <mark@vector35.com> | 2025-07-31 13:28:58 -0700 |
|---|---|---|
| committer | Mark Rowe <mark@vector35.com> | 2025-12-15 20:25:23 -0800 |
| commit | 2f1150703636b2b06d84bb66853fce7382bf6f29 (patch) | |
| tree | 0dbf0209a2cc9025079e664b623d3da4df1e44ab /base/CMakeLists.txt | |
| parent | 8789b8690d74b7ecba68b65b061ab64befeaf539 (diff) | |
Introduce bn::base::function_ref, a non-owning function wrapper inspired by C++26's std::function_ref
This is to `std::function` as `std::string_view` is to `std::string`.
Diffstat (limited to 'base/CMakeLists.txt')
| -rw-r--r-- | base/CMakeLists.txt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/base/CMakeLists.txt b/base/CMakeLists.txt new file mode 100644 index 00000000..4c0ace90 --- /dev/null +++ b/base/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.15 FATAL_ERROR) + +file(GLOB BN_BASE_SOURCES CONFIGURE_DEPENDS *.cpp *.h) + +add_library(binaryninjabase OBJECT ${BN_BASE_SOURCES}) +set_target_properties(binaryninjabase PROPERTIES LINKER_LANGUAGE CXX) + +target_include_directories(binaryninjabase + PUBLIC ${PROJECT_SOURCE_DIR}) + +set_target_properties(binaryninjabase PROPERTIES + CXX_STANDARD 20 + CXX_VISIBILITY_PRESET hidden + CXX_STANDARD_REQUIRED ON + VISIBILITY_INLINES_HIDDEN ON + POSITION_INDEPENDENT_CODE ON) + +if(BN_REF_COUNT_DEBUG) + target_compile_definitions(binaryninjabase PUBLIC BN_REF_COUNT_DEBUG) +endif() + +if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo) + target_compile_definitions(binaryninjabase PRIVATE BN_ENABLE_LOG_TRACE) +endif() |
