-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
31 lines (21 loc) · 885 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
cmake_minimum_required(VERSION 3.24)
project(qc-hash)
# Fetch dependencies
if(${PROJECT_IS_TOP_LEVEL})
include(FetchContent)
FetchContent_Declare(qc-cmake SOURCE_DIR ${CMAKE_SOURCE_DIR}/../qc-cmake)
FetchContent_Declare(qc-core SOURCE_DIR ${CMAKE_SOURCE_DIR}/../qc-core OVERRIDE_FIND_PACKAGE)
option(BUILD_GMOCK "" OFF)
option(INSTALL_GTEST "" OFF)
option(gtest_force_shared_crt "" ON)
FetchContent_Declare(GTest GIT_REPOSITORY https://github.com/google/googletest.git GIT_TAG v1.14.0 OVERRIDE_FIND_PACKAGE)
FetchContent_MakeAvailable(qc-cmake qc-core GTest)
endif()
set(QC_CXX_STANDARD 20)
qc_setup_target(qc-hash INTERFACE_LIBRARY)
if(${PROJECT_IS_TOP_LEVEL})
add_subdirectory(test EXCLUDE_FROM_ALL)
# TEMPORARILY OUT OF COMMISSION
# WILL SWITCH TO GOOGLE BENCHMARK SOON
#add_subdirectory(benchmark EXCLUDE_FROM_ALL)
endif()