-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathCMakeLists.txt
30 lines (23 loc) · 937 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
cmake_minimum_required(VERSION 3.20)
project(CLIc VERSION 0.16.0)
set(kernel_version_tag "3.1.0" CACHE STRING "clEsperanto kernel version tag")
set(eigen_lib_version_tag "3.4.0" CACHE STRING "Eigen library version tag")
# if not set, set the default build type to Release
if(NOT CLE_BACKEND_TYPE)
set(CLE_BACKEND_TYPE "OPENCL" CACHE STRING "Backend to use (CUDA or OCL)")
endif()
# set environment variables
include(${PROJECT_SOURCE_DIR}/cmake/CMakeSetEnv.cmake)
# find library dependencies
include(${PROJECT_SOURCE_DIR}/cmake/CMakeBackends.cmake)
# build clic library
add_subdirectory(clic)
# Build and run tests if BUILD_TESTING is ON (-DBUILD_TESTING=ON)
if(BUILD_TESTING)
include(CTest)
add_subdirectory(${PROJECT_SOURCE_DIR}/tests)
endif(BUILD_TESTING)
# Build documentation if BUILD_DOCUMENTATION is ON (-DBUILD_DOCUMENTATION=ON)
if (BUILD_DOCUMENTATION)
add_subdirectory(${PROJECT_SOURCE_DIR}/docs)
endif()