Skip to content

Commit

Permalink
more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
gdraheim committed Aug 11, 2024
1 parent d38f2b0 commit aa62d20
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions CMakeScripts/TestLargefileSensitive.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
MACRO(TEST_LARGEFILE_SENSITIVE VARIABLE)
if(NOT DEFINED ${VARIABLE})
message(STATUS "Testing off_t sizes with or without -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES")
set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE_SOURCE -Doff_t_32=off_t)
check_type_size( off_t_32 LARGEFILE_SIZEOF_OFF_T_32 )
set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE_SOURCE -Doff_t_64=off_t -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES)
check_type_size( off_t_64 LARGEFILE_SIZEOF_OFF_T_64 )
set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE_SOURCE -Doff_t_DEF=off_t)
check_type_size( off_t_DEF LARGEFILE_SIZEOF_OFF_T_DEF )
set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE_SOURCE -Doff_t_D64=off_t -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES)
check_type_size( off_t_D64 LARGEFILE_SIZEOF_OFF_T_D64 )
set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE)
check_type_size( off64_t LARGEFILE_SIZEOF_OFF64_T )

SET(${VARIABLE} 0 CACHE INTERNAL "System has largefile support" FORCE)
SET(${VARIABLE}_SENSITIVE 0 CACHE INTERNAL "System is largefile sensitive" FORCE)
SET(${VARIABLE}_FLAGS "" CACHE INTERNAL "Compiler flags for largefile support" FORCE)
if(LARGEFILE_SIZEOF_OFF_T_32)
message(STATUS "Testing off_t found sizeof(off_t)=${LARGEFILE_SIZEOF_OFF_T_32} and BITS=64 sizeof(off_t)=${LARGEFILE_SIZEOF_OFF_T_64}")
if(LARGEFILE_SIZEOF_OFF_T_DEF)
message(STATUS "Testing off_t found sizeof(off_t)=${LARGEFILE_SIZEOF_OFF_T_DEF} and BITS=64 sizeof(off_t)=${LARGEFILE_SIZEOF_OFF_T_D64}")
SET(${VARIABLE} 1 CACHE INTERNAL "System has largefile support" FORCE)
if(NOT LARGEFILE_SIZEOF_OFF_T_32 EQUAL LARGEFILE_SIZEOF_OFF_T_64)
if(NOT LARGEFILE_SIZEOF_OFF_T_DEF EQUAL LARGEFILE_SIZEOF_OFF_T_D64)
SET(${VARIABLE}_SENSITIVE 1 CACHE INTERNAL "System is largefile sensitive" FORCE)
message(STATUS "System is large file sensitive - need to rename symbols to xx64")
SET(${VARIABLE}_FLAGS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES)
Expand Down

0 comments on commit aa62d20

Please sign in to comment.