diff options
author | Hans Hagen <pragma@wxs.nl> | 2022-09-16 15:53:42 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2022-09-16 15:53:42 +0200 |
commit | c161b7d6fe142231346cc1844e6e27c0ab7718c1 (patch) | |
tree | 3fd877b8986137703e987e4651a2db8e946a0f72 /source/luametatex/cmake/luarest.cmake | |
parent | e94fa4dc30ec28a6727aa85e17aaac18b76aeadb (diff) | |
download | context-c161b7d6fe142231346cc1844e6e27c0ab7718c1.tar.gz |
2022-09-16 14:41:00
Diffstat (limited to 'source/luametatex/cmake/luarest.cmake')
-rw-r--r-- | source/luametatex/cmake/luarest.cmake | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/source/luametatex/cmake/luarest.cmake b/source/luametatex/cmake/luarest.cmake new file mode 100644 index 000000000..e374ec156 --- /dev/null +++ b/source/luametatex/cmake/luarest.cmake @@ -0,0 +1,32 @@ +# The cerf library is actually optional but for now we compile it with the +# rest because the complex interfaces are different per platform. There is +# not that much code involved. But, anyway, at some point it might become +# a real optional module in which case the following will change. + +set(luarest_sources + + source/luaoptional/lmtcerflib.c + + source/libraries/libcerf/erfcx.c + source/libraries/libcerf/err_fcts.c + source/libraries/libcerf/im_w_of_x.c + source/libraries/libcerf/w_of_z.c + source/libraries/libcerf/width.c +) + +add_library(luarest STATIC ${luarest_sources}) + +target_include_directories(luarest PRIVATE + source/libraries/libcerf + source/luacore/lua54/src +) + +# only when all ok, to avoid messages + +include(CheckCCompilerFlag) + +CHECK_C_COMPILER_FLAG("-Wno-discarded-qualifiers" limited_support) + +if (limited_support) + target_compile_options(luarest PRIVATE -Wno-discarded-qualifiers) +endif() |