-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
53 lines (47 loc) · 1.44 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
cmake_minimum_required(VERSION 3.1)
project(rsp C)
# Prevents the shared library being called librsp
set(CMAKE_SHARED_LIBRARY_PREFIX "")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
message("Using 64-bit compiler options")
set(CMAKE_C_FLAGS "\
-masm=intel \
-fPIC \
-DPLUGIN_API_VERSION=0x0101 \
-DARCH_MIN_SSE2 \
-march=native \
-mstackrealign \
-Wall \
-pedantic \
-Wall -Wshadow -Wredundant-decls -Wextra -Wcast-align -Wcast-qual \
-Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op \
-Wmissing-include-dirs -Wstrict-overflow=1 -Wundef -Wno-unused \
-Wno-variadic-macros -Wno-parentheses -fdiagnostics-show-option"
)
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
message("Using 32-bit compiler options")
set(CMAKE_C_FLAGS "\
-masm=intel \
-DPLUGIN_API_VERSION=0x0101 \
-DARCH_MIN_SSE2 \
-march=native \
-mstackrealign \
-Wall \
-pedantic \
-Wall -Wshadow -Wredundant-decls -Wextra -Wcast-align -Wcast-qual \
-Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op \
-Wmissing-include-dirs -Wstrict-overflow=1 -Wundef -Wno-unused \
-Wno-variadic-macros -Wno-parentheses -fdiagnostics-show-option"
)
endif()
add_library(
${CMAKE_PROJECT_NAME} SHARED
module.c
su.c
vu/vu.c
vu/multiply.c
vu/add.c
vu/select.c
vu/logical.c
vu/divide.c
)