-
Notifications
You must be signed in to change notification settings - Fork 223
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
36 lines (28 loc) · 1.28 KB
/
Copy pathCMakeLists.txt
File metadata and controls
36 lines (28 loc) · 1.28 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
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright the Vortex contributors
# Source-tree entry point: vortex-ffi builds the Rust archive through Cargo;
# lang/cpp adds the C++ wrapper. Both also support standalone configuration.
#
# add_subdirectory(path/to/vortex vortex)
# target_link_libraries(my_c_target PRIVATE Vortex::ffi_static)
# target_link_libraries(my_cpp_target PRIVATE Vortex::cpp_static)
#
# Use Vortex::ffi_shared and Vortex::cpp_shared for shared linkage.
#
# See lang/cpp/README.md for build options and embedding requirements,
# and vortex-ffi/README.md for C API development.
# CMake 3.25 is required for block() and FetchContent SYSTEM.
cmake_minimum_required(VERSION 3.25)
project(Vortex DESCRIPTION "Vortex C and C++ libraries" LANGUAGES NONE)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Directory-scoped developer defaults; an embedded root resets inherited ownership.
set(_vortex_top_level "${PROJECT_IS_TOP_LEVEL}")
# A standalone configure writes compile_commands.json for editor tooling.
if(PROJECT_IS_TOP_LEVEL)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
endif()
# ctest only descends into subdirectories from a root that has testing enabled.
enable_testing()
add_subdirectory(vortex-ffi ffi)
add_subdirectory(lang/cpp cpp)