blob: 4870178fd20fdd7491d1065972242515019fe0ec (
plain)
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
|
set(mp_sources
source/mp/mpc/mp.c
source/mp/mpc/mpstrings.c
source/mp/mpc/mpmath.c
source/mp/mpc/mpmathdouble.c
source/mp/mpc/mpmathbinary.c
source/mp/mpc/mpmathdecimal.c
source/mp/mpc/mpmathposit.c
source/libraries/decnumber/decContext.c
source/libraries/decnumber/decNumber.c
source/libraries/avl/avl.c
source/lua/lmtmplib.c
source/luarest/lmtxdecimallib.c
)
add_library(mp STATIC ${mp_sources})
target_include_directories(mp PRIVATE
.
source/.
source/mp/mpc
source/luacore/lua54/src
source/libraries/avl
source/libraries/decnumber
source/utilities
source/libraries/mimalloc/include
source/libraries/softposit/source/include
)
target_compile_definitions(mp PUBLIC
DECUSE64=1
# DECCHECK=1
# DECBUFFER=512
DECNUMDIGITS=1000
)
if (CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_compile_options(mp PRIVATE
-Wno-unreachable-code-break
)
endif()
if (NOT MSVC)
target_compile_options(mp PRIVATE
-Wno-unused-parameter
-Wno-sign-compare
-Wno-cast-qual
-Wno-cast-align
# for decnumber with lto
-fno-strict-aliasing
)
endif()
|