changeset 6433:0ebe8cfd9bf7

MacOS: add CFlags for zlib to build correctly
author Alain Mazy <am@orthanc.team>
date Tue, 18 Nov 2025 16:54:48 +0100
parents 3b13fc5cd42b
children fef8af71a589 555f0bb4164e
files OrthancFramework/Resources/CMake/Compiler.cmake
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Resources/CMake/Compiler.cmake	Tue Nov 18 16:50:23 2025 +0100
+++ b/OrthancFramework/Resources/CMake/Compiler.cmake	Tue Nov 18 16:54:48 2025 +0100
@@ -246,6 +246,9 @@
   # fix this error that appears with recent compilers on MacOS: boost/mpl/aux_/integral_wrapper.hpp:73:31: error: integer value -1 is outside the valid range of values [0, 3] for this enumeration type [-Wenum-constexpr-conversion]
   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-enum-constexpr-conversion")
 
+  # it seems that some recent MacOS compilers don't set these flags correctly which prevents zlib from building correctly
+   SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64")
+
   add_definitions(
     -D_XOPEN_SOURCE=1
     )