summaryrefslogtreecommitdiff
path: root/source/luametatex/cmake
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2022-11-14 23:18:10 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2022-11-14 23:18:10 +0100
commit08473f11287cb263079c0435068312cbc6d736e8 (patch)
tree2548fb8b58e18a507e54fa8426a79c6956c3ef2e /source/luametatex/cmake
parentdd0a80e5ec42f60832e7d5dc47210e6f3545c400 (diff)
downloadcontext-08473f11287cb263079c0435068312cbc6d736e8.tar.gz
2022-11-14 22:56:00
Diffstat (limited to 'source/luametatex/cmake')
-rw-r--r--source/luametatex/cmake/luasocket.cmake8
-rw-r--r--source/luametatex/cmake/mingw-32.cmake6
-rw-r--r--source/luametatex/cmake/mingw-64.cmake6
-rw-r--r--source/luametatex/cmake/mp.cmake8
4 files changed, 21 insertions, 7 deletions
diff --git a/source/luametatex/cmake/luasocket.cmake b/source/luametatex/cmake/luasocket.cmake
index 8489b0a80..e36f1f7e6 100644
--- a/source/luametatex/cmake/luasocket.cmake
+++ b/source/luametatex/cmake/luasocket.cmake
@@ -51,6 +51,14 @@ if (WIN32)
)
endif()
+# It seems to depend on the mingw installation:
+
+if (__MINGW64_TOOLCHAIN_)
+ target_compile_definitions(luasocket PRIVATE
+ LUASOCKET_INET_PTON
+ )
+endif()
+
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_definitions(luasocket PRIVATE
LUASOCKET_INET_PTON
diff --git a/source/luametatex/cmake/mingw-32.cmake b/source/luametatex/cmake/mingw-32.cmake
index ef5001226..6a06431d5 100644
--- a/source/luametatex/cmake/mingw-32.cmake
+++ b/source/luametatex/cmake/mingw-32.cmake
@@ -1,6 +1,6 @@
-if (NOT __MINGW64_TOOLCHAIN_)
- add_compile_options(-DLUASOCKET_INET_PTON)
-endif()
+# if (NOT __MINGW64_TOOLCHAIN_)
+# add_compile_options(-DLUASOCKET_INET_PTON)
+# endif()
set(CMAKE_SYSTEM_NAME Windows)
set(TOOLCHAIN_PREFIX i686-w64-mingw32)
diff --git a/source/luametatex/cmake/mingw-64.cmake b/source/luametatex/cmake/mingw-64.cmake
index c57bed871..294ef5e55 100644
--- a/source/luametatex/cmake/mingw-64.cmake
+++ b/source/luametatex/cmake/mingw-64.cmake
@@ -1,6 +1,6 @@
-if (NOT __MINGW64_TOOLCHAIN_)
- add_compile_options(-DLUASOCKET_INET_PTON)
-endif()
+# if (NOT __MINGW64_TOOLCHAIN_)
+# add_compile_options(-DLUASOCKET_INET_PTON)
+# endif()
set(CMAKE_SYSTEM_NAME Windows)
set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
diff --git a/source/luametatex/cmake/mp.cmake b/source/luametatex/cmake/mp.cmake
index 1d064101d..22680cdb7 100644
--- a/source/luametatex/cmake/mp.cmake
+++ b/source/luametatex/cmake/mp.cmake
@@ -38,6 +38,12 @@ target_compile_definitions(mp PUBLIC
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
@@ -46,5 +52,5 @@ if (NOT MSVC)
-Wno-cast-align
# for decnumber with lto
-fno-strict-aliasing
-)
+ )
endif()