forked from intel/double-batched-fft-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
56 lines (48 loc) · 1.76 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
46
47
48
49
50
51
52
53
54
55
56
# Copyright (C) 2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.23)
project(double_batched_fft_library VERSION 0.4.0 LANGUAGES CXX)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
include(CMakeDependentOption)
option(NO_DOUBLE_PRECISION "Disable double precision benchmark and tests" OFF)
option(USE_CUDA "Compile CUDA tests" OFF)
option(USE_MKL "Compile MKL benchmark" OFF)
option(USE_VKFFT "Compile VkFFT benchmark" OFF)
option(ENABLE_WARNINGS "Enable compiler warnings" ON)
option(BUILD_DOCUMENTATION "Generate documentation" OFF)
option(BUILD_BENCHMARK "Build the benchmark" ON)
option(BUILD_EXAMPLE "Build the examples" ON)
option(BUILD_TESTING "Build unit tests" ON)
option(BUILD_SYCL "Build Double-Batched FFT Library for SYCL" ON)
cmake_dependent_option(BUILD_LEVEL_ZERO
"Build Double-Batched FFT Library for Level Zero; required when SYCL build is enabled"
ON "NOT BUILD_SYCL" ON)
cmake_dependent_option(BUILD_OPENCL
"Build Double-Batched FFT Library for Level Zero; required when SYCL build is enabled"
ON "NOT BUILD_SYCL" ON)
if(DEFINED clir_SHARED_LIBS)
set(BUILD_SHARED_LIBS ${clir_SHARED_LIBS})
endif()
if(DEFINED bbfft_SHARED_LIBS)
set(BUILD_SHARED_LIBS "${bbfft_SHARED_LIBS}")
endif()
if (NOT DEFINED CMAKE_CXX_VISIBILITY_PRESET AND NOT DEFINED CMAKE_VISIBILITY_INLINES_HIDDEN)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN YES)
endif()
if(BUILD_BENCHMARK)
add_subdirectory(benchmark)
endif()
if(BUILD_EXAMPLE)
add_subdirectory(examples)
endif()
if(BUILD_DOCUMENTATION)
add_subdirectory(docs)
endif()
add_subdirectory(src)
add_subdirectory(clir)
add_subdirectory(tools)
enable_testing()
if(BUILD_TESTING)
add_subdirectory(test)
endif()