-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
29 lines (26 loc) · 1.39 KB
/
CMakeLists.txt
File metadata and controls
29 lines (26 loc) · 1.39 KB
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)
project(StackVector)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_executable(example example.cpp)
add_executable(buffer_view_example buffer_view_example.cpp)
add_executable(function_runner_example function_runner_example.cpp)
add_executable(parallel_runner_example parallel_runner_example.cpp)
add_executable(benchmark_function_runner benchmark_function_runner.cpp)
add_executable(benchmark_parallel_runner benchmark_parallel_runner.cpp)
# Optional: Add compiler warnings
if(MSVC)
target_compile_options(example PRIVATE /W4)
target_compile_options(buffer_view_example PRIVATE /W4)
target_compile_options(function_runner_example PRIVATE /W4)
target_compile_options(parallel_runner_example PRIVATE /W4)
target_compile_options(benchmark_function_runner PRIVATE /W4)
target_compile_options(benchmark_parallel_runner PRIVATE /W4)
else()
target_compile_options(example PRIVATE -Wall -Wextra -Wpedantic)
target_compile_options(buffer_view_example PRIVATE -Wall -Wextra -Wpedantic)
target_compile_options(function_runner_example PRIVATE -Wall -Wextra -Wpedantic)
target_compile_options(parallel_runner_example PRIVATE -Wall -Wextra -Wpedantic)
target_compile_options(benchmark_function_runner PRIVATE -Wall -Wextra -Wpedantic)
target_compile_options(benchmark_parallel_runner PRIVATE -Wall -Wextra -Wpedantic)
endif()