Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ check_symbol_exists(fnmatch fnmatch.h HAVE_FNMATCH)
check_symbol_exists(iconv iconv.h HAVE_ICONV)

set(SIZE_FORMAT "zi")
check_c_source_compiles("#include <stdio.h>\nint main(int argc, char **argv) { size_t value = 0; printf(\"%${SIZE_FORMAT}\", value); return 0; }" SIZE_FORMAT_ZI)
check_c_source_compiles("#include <stdio.h>\nint main() { size_t value = 0; printf(\"%${SIZE_FORMAT}\", value); return 0; }" SIZE_FORMAT_ZI)
if(NOT SIZE_FORMAT_ZI)
set(SIZE_FORMAT "i")
check_c_source_compiles("#include <stdio.h>\nint main(int argc, char **argv) { size_t value = 0; printf(\"%${SIZE_FORMAT}\", value); return 0; }" SIZE_FORMAT_I)
check_c_source_compiles("#include <stdio.h>\nint main() { size_t value = 0; printf(\"%${SIZE_FORMAT}\", value); return 0; }" SIZE_FORMAT_I)
if(NOT SIZE_FORMAT_I)
set(SIZE_FORMAT "li")
check_c_source_compiles("#include <stdio.h>\nint main(int argc, char **argv) { size_t value = 0; printf(\"%${SIZE_FORMAT}\", value); return 0; }" SIZE_FORMAT_LI)
check_c_source_compiles("#include <stdio.h>\nint main() { size_t value = 0; printf(\"%${SIZE_FORMAT}\", value); return 0; }" SIZE_FORMAT_LI)
if(NOT SIZE_FORMAT_LI)
message(FATAL_ERROR "You must be using a really weird platform!")
endif()
Expand Down