-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
40 lines (32 loc) · 933 Bytes
/
CMakeLists.txt
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
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
cmake_minimum_required(VERSION 3.25)
project(
beman.elide
DESCRIPTION "Implements proposed std::elide"
LANGUAGES CXX
)
enable_testing()
# [CMAKE.SKIP_TESTS]
option(
BEMAN_ELIDE_BUILD_TESTS
"Enable building tests and test infrastructure. Default: ON. Values: { ON, OFF }."
${PROJECT_IS_TOP_LEVEL}
)
include(FetchContent)
include(GNUInstallDirs)
if(BEMAN_ELIDE_BUILD_TESTS)
# Fetch GoogleTest
FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG
f8d7d77c06936315286eb55f8de22cd23c188571 # release-1.14.0
EXCLUDE_FROM_ALL
)
set(INSTALL_GTEST OFF) # Disable GoogleTest installation
FetchContent_MakeAvailable(googletest)
endif()
add_subdirectory(src/beman/elide)
if(BEMAN_ELIDE_BUILD_TESTS)
add_subdirectory(tests/beman/elide)
endif()