-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
41 lines (31 loc) · 887 Bytes
/
CMakeLists.txt
File metadata and controls
41 lines (31 loc) · 887 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
30
31
32
33
34
35
36
37
38
39
40
41
cmake_minimum_required(VERSION 3.24)
project(advanced_algorithms LANGUAGES CXX)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_C_STANDARD 23)
set(CMAKE_CXX_STANDARD 23)
include(FetchContent)
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
add_compile_options(-march=native)
endif ()
if (MSVC)
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(OpenMP_RUNTIME_MSVC llvm)
else ()
add_compile_options(/arch:AVX512)
endif ()
endif ()
FetchContent_Declare(
mimalloc
GIT_REPOSITORY https://github.com/microsoft/mimalloc.git
GIT_TAG v2.2.3
GIT_SHALLOW ON
)
add_compile_definitions(MI_OVERRIDE=ON)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
FetchContent_MakeAvailable(mimalloc)
find_package(OpenMP REQUIRED)
add_subdirectory(1)
add_subdirectory(2)
add_subdirectory(3)
add_subdirectory(4)
add_subdirectory(5)