-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
32 lines (23 loc) · 785 Bytes
/
CMakeLists.txt
File metadata and controls
32 lines (23 loc) · 785 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
cmake_minimum_required(VERSION 3.5)
project(Counter)
set(CMAKE_CXX_STANDARD 17)
include_directories(${CMAKE_SOURCE_DIR})
if(MSVC)
add_compile_options(/GA /EHsc /fp:fast /MP /arch:AVX2)
if(CMAKE_BUILD_TYPE MATCHES "Debug")
add_compile_options(/Od /Zi /Zf)
endif()
if(CMAKE_BUILD_TYPE MATCHES "Release")
add_compile_options(/O2)
endif()
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
add_compile_options(-Wall -march=native -fdiagnostics-color=auto)
if(CMAKE_BUILD_TYPE MATCHES "Debug")
add_compile_options(-Og -g3)
endif()
if(CMAKE_BUILD_TYPE MATCHES "Release")
add_compile_options(-Ofast -funroll-loops -fno-exceptions)
endif()
endif()
add_subdirectory(benchmark)
add_subdirectory(verify)