-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
57 lines (46 loc) · 1.47 KB
/
CMakeLists.txt
File metadata and controls
57 lines (46 loc) · 1.47 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
cmake_minimum_required(VERSION 3.22)
project(Stompbox VERSION 0.0.1)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED OFF)
set(CMAKE_CXX_EXTENSIONS OFF)
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
include_directories(SYSTEM /usr/local/include)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
add_compile_definitions(NOMINMAX WIN32_LEAN_AND_MEAN)
else()
message(FATAL_ERROR "Unrecognized Platform!")
endif()
if (MSVC)
add_compile_options(
"$<$<CONFIG:DEBUG>:/W4>"
"$<$<CONFIG:RELEASE>:/O2>"
)
else()
add_compile_options(
-Wall
# -Wpedantic -Wextra -Wstrict-aliasing -Wunreachable-code -Weffc++ -Wno-unused-parameter
"$<$<CONFIG:DEBUG>:-Og;-ggdb>"
"$<$<CONFIG:RELWITHDEBINFO>:-Ofast>"
"$<$<CONFIG:RELEASE>:-Ofast>"
)
endif()
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(amd64)|(AMD64)|(x86_64)")
option(USE_NATIVE_ARCH "Enable architecture-specific optimizations" OFF)
if (USE_NATIVE_ARCH)
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
add_compile_options(/arch:AVX2)
message(STATUS "Enabling /arch:AVX2")
else()
add_compile_options(-march=x86-64-v3)
message(STATUS "Enabling -march=x86-64-v3")
endif()
endif (USE_NATIVE_ARCH)
endif ()
set(STOMPBOX_DEPS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/Dependencies")
add_subdirectory(stompbox-core)
add_subdirectory(stompbox-stomps)
add_subdirectory(stompbox-jack)
add_subdirectory(stompbox-capi)
add_subdirectory(stompbox-lv2)