-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
45 lines (36 loc) · 1.16 KB
/
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
41
42
43
44
45
cmake_minimum_required(VERSION 3.20)
project(mc)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS "-O3 -march=native")
option(ENABLE_SYCL "Build with SYCL" OFF)
option(GCC_TOOLCHAIN "Path to GCC installation to be used by Clang-based compilers" OFF)
if(ENABLE_SYCL)
add_compile_options(-fsycl)
add_link_options(-fsycl)
endif()
if(GCC_TOOLCHAIN)
add_compile_options(--gcc-toolchain=${GCC_TOOLCHAIN})
add_link_options(--gcc-toolchain=${GCC_TOOLCHAIN})
endif()
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
)
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
FetchContent_Declare(
mdspan
GIT_REPOSITORY https://github.com/kokkos/mdspan.git
GIT_TAG mdspan-0.6.0)
FetchContent_MakeAvailable(mdspan)
FetchContent_Declare(
fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
GIT_TAG 10.1.1)
FetchContent_MakeAvailable(fmt)
add_subdirectory(include)
add_subdirectory(examples)
add_subdirectory(test)