-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
74 lines (59 loc) · 2.31 KB
/
Copy pathCMakeLists.txt
File metadata and controls
74 lines (59 loc) · 2.31 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
cmake_minimum_required(VERSION 3.28)
# `import std` is still gated behind a CMake-version-specific UUID.
# Keep this branch aligned with the CMake version actually used by the active
# host lane instead of editing test fixtures or ad-hoc docs to match.
if(CMAKE_VERSION VERSION_GREATER_EQUAL 4.3)
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD "451f2fe2-a8a2-47c3-bc32-94786d8fc91b")
elseif(CMAKE_VERSION VERSION_GREATER_EQUAL 4.0)
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD "d0edc3af-4c50-42ea-a356-e2862fe7a444")
else()
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD "0e5b6991-d74f-4b3d-a41c-cf096e0b2508")
endif()
project(BinaryAudioGeneratorCpp LANGUAGES CXX)
option(FLIPBITS_BUILD_TESTS "Build native test executables under Test/." ON)
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/flipbits_core_version.cmake")
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/flipbits_toolchain_capabilities.cmake")
set(FLIPBITS_CORE_GENERATED_INCLUDE_DIR "${PROJECT_BINARY_DIR}/generated/include")
if(POLICY CMP0155)
cmake_policy(SET CMP0155 NEW)
endif()
if(NOT CMAKE_GENERATOR STREQUAL "Ninja")
message(
FATAL_ERROR
"Root host currently supports the single clang++ + Ninja lane only."
)
endif()
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
message(
FATAL_ERROR
"Root host currently supports clang++ only. "
"GNU/MSVC/Visual Studio host lanes are outside the current supported promotion target."
)
endif()
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
message(FATAL_ERROR "Root host currently requires Clang 16 or newer.")
endif()
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_SCAN_FOR_MODULES ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
include(CTest)
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/flipbits_test_helpers.cmake")
add_subdirectory(libs/audio_core)
add_subdirectory(libs/audio_api)
add_subdirectory(libs/audio_io)
add_subdirectory(libs/audio_runtime)
add_custom_target(FlipBits_rust_cli_native_deps)
add_dependencies(
FlipBits_rust_cli_native_deps
bag_api
audio_io
bag_core
)
add_subdirectory(apps/audio_cli/rust/cmake)
if(FLIPBITS_BUILD_TESTS)
add_subdirectory(Test)
endif()