-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
29 lines (22 loc) · 980 Bytes
/
CMakeLists.txt
File metadata and controls
29 lines (22 loc) · 980 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
cmake_minimum_required(VERSION 3.10)
# Set the project name and version
project(MyProject VERSION 1.0)
# Specify the C++ standard
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# Set the build type if not specified
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
# Add the executable without USE_SPLAY_TREE defined
add_executable(FlashRadixTree main.cpp)
# Add another executable with USE_SPLAY_TREE defined
add_executable(FlashRadixTreeWithSplay main.cpp) # Use the same main.cpp file
target_compile_definitions(FlashRadixTreeWithSplay PRIVATE USE_SPLAY_TREE=1)
# Set compiler flags for Release build (including -O3 optimization)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2")
# Include header files if needed
#include_directories(${PROJECT_SOURCE_DIR}/M1-Cycles)
# Link libraries if needed
# target_link_libraries(FlashRadixTree PRIVATE some_library)
# target_link_libraries(FlashRadixTreeWithSplay PRIVATE some_library)