Files
nvbench/CMakeLists.txt
Allison Vacanti 570aed1373 Bump CMake to 3.18.3 for NVCC/MSVC/C++17 bugfixes.
Otherwise the C++17 flags won't be added.
2021-01-14 17:46:09 -05:00

33 lines
866 B
CMake

# 3.18.3 is needed for a MSVC + NVCC + C++17 bugfix.
cmake_minimum_required(VERSION 3.18.3)
project(nvbench CUDA)
# Setup some vars for CPM packages:
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CUDA_STANDARD 17)
include(CPM)
CPMAddPackage(
NAME benchmark
GITHUB_REPOSITORY google/benchmark
VERSION 1.5.2
OPTIONS
"BENCHMARK_ENABLE_TESTING Off"
# Note from cucollections:
# The REGEX feature test fails when gbench's cmake is run under CPM w/ gcc5.4 because it doesn't assume C++11
# Additionally, attempting to set the CMAKE_CXX_VERSION here doesn't propogate to the feature test build
# Therefore, we just disable the feature test and assume platforms we care about have a regex impl available
"RUN_HAVE_STD_REGEX 0"
)
CPMAddPackage(
NAME fmt
GITHUB_REPOSITORY fmtlib/fmt
GIT_TAG 7.1.3
)
add_subdirectory(nvbench)
add_subdirectory(testing)