luarest.cmake /size: 932 b    last modification: 2024-01-16 10:21
1# The cerf library is actually optional but for now we compile it with the
2# rest because the complex interfaces are different per platform. There is
3# not that much code involved. But, anyway, at some point it might become
4# a real optional module in which case the following will change.
5
6set(luarest_sources
7
8    source/luaoptional/lmtcerflib.c
9
10    source/libraries/libcerf/erfcx.c
11    source/libraries/libcerf/err_fcts.c
12    source/libraries/libcerf/im_w_of_x.c
13    source/libraries/libcerf/w_of_z.c
14    source/libraries/libcerf/width.c
15)
16
17add_library(luarest STATIC ${luarest_sources})
18
19target_include_directories(luarest PRIVATE
20    source/libraries/libcerf
21    source/luacore/lua54/src
22)
23
24# only when all ok, to avoid messages
25
26include(CheckCCompilerFlag)
27
28CHECK_C_COMPILER_FLAG("-Wno-discarded-qualifiers" limited_support)
29
30if (limited_support)
31    target_compile_options(luarest PRIVATE -Wno-discarded-qualifiers)
32endif()
33