1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-13 07:33:02 +00:00
transmission/cmake/FindWideInteger.cmake
Yat Ho 52a12200b2
chore: bump wide-integer (#7383)
* chore: bump wide_integer

* refactor: use `uint64_t` for better performance
2025-03-04 08:19:01 -06:00

21 lines
614 B
CMake

add_library(WideInteger::WideInteger INTERFACE IMPORTED)
target_include_directories(WideInteger::WideInteger
INTERFACE
${TR_THIRD_PARTY_SOURCE_DIR}/wide-integer)
set(_INT128_TEST_FILE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckInt128.c)
file(WRITE ${_INT128_TEST_FILE}
"int main()
{
unsigned __int128 u;
signed __int128 i;
return 0;
}")
try_compile(_HAVE_INT128
${CMAKE_BINARY_DIR}
${_INT128_TEST_FILE})
target_compile_definitions(WideInteger::WideInteger
INTERFACE
$<$<BOOL:${_HAVE_INT128}>:WIDE_INTEGER_HAS_LIMB_TYPE_UINT64>
)