-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCMakeLists.txt
47 lines (41 loc) · 1.15 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
project(PULPNNMIXED)
add_library(pulp-nn-mixed STATIC)
target_compile_options(pulp-nn-mixed PRIVATE
-Ofast
-Wno-conversion
-Wno-sign-compare
-Wno-sign-conversion
-Wno-unused-variable
-Wno-unused-function
-Wno-unused-parameter
-Wno-incompatible-pointer-types
-Wno-implicit-function-declaration
-Wno-attributes
-Wno-pointer-sign
-Wno-unused-value
-Wno-int-conversion
-Wno-typedef-redefinition
-Wno-uninitialized
)
if(TOOLCHAIN STREQUAL LLVM)
target_compile_options(pulp-nn-mixed PRIVATE -Wno-ignored-qualifiers)
else()
target_compile_options(pulp-nn-mixed PRIVATE -Wno-discarded-qualifiers)
endif()
target_include_directories(pulp-nn-mixed PRIVATE ${PULP_SDK_INCLUDES})
target_compile_options(pulp-nn-mixed PRIVATE ${PULP_SDK_COMPILE_FLAGS})
if(PULPNNVERSION STREQUAL XPULPV2)
if(PULPNNBITWIDTH STREQUAL 32)
set(INCLUDES
${CMAKE_CURRENT_LIST_DIR}/XpulpV2/32bit/include
)
file(GLOB_RECURSE SRC
XpulpV2/32bit/src/**/*.c
)
endif()
endif()
target_include_directories(pulp-nn-mixed PUBLIC
${INCLUDES}
)
target_sources(pulp-nn-mixed PRIVATE ${SRC})
set(PULPNN_INCLUDES ${INCLUDES} CACHE INTERNAL "PULPNN_INCLUDES")