-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathCMakeLists.txt
60 lines (40 loc) · 1.34 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
57
58
59
60
cmake_minimum_required(VERSION 3.14)
project(ppl.kernel.cpu)
# --------------------------------------------------------------------------- #
# options
option(PPLNN_INSTALL "install ppl headers and libs" ON)
option(PPLNN_HOLD_DEPS "don't update dependencies" OFF)
if(MSVC)
option(PPLNN_USE_MSVC_STATIC_RUNTIME "" ON)
endif()
option(PPLNN_USE_X86_64 "" OFF)
option(PPLNN_USE_AARCH64 "" OFF)
option(PPLNN_USE_ARMV7 "" OFF)
option(PPLNN_USE_RISCV64 "" OFF)
# --------------------------------------------------------------------------- #
if(APPLE)
message(FATAL_ERROR "MacOS is not supported currently.")
endif()
# --------------------------------------------------------------------------- #
# dependencies
include(cmake/deps.cmake)
# --------------------------------------------------------------------------- #
# compiler related
if(PPLNN_USE_MSVC_STATIC_RUNTIME)
hpcc_use_msvc_static_runtime()
else()
hpcc_use_msvc_dynamic_runtime()
endif()
# --------------------------------------------------------------------------- #
hpcc_populate_dep(pplcommon)
# kernels
if(PPLNN_USE_X86_64)
include(cmake/x86.cmake)
endif()
if(PPLNN_USE_RISCV64)
include(cmake/riscv.cmake)
endif()
if(PPLNN_USE_AARCH64 OR PPLNN_USE_ARMV7)
include(cmake/arm.cmake)
endif()
# --------------------------------------------------------------------------- #