From 29451d61b556ae68feb7de4b3d0c0f1eba6917ef Mon Sep 17 00:00:00 2001 From: Dariqq <77271900+Dariqq@users.noreply.github.com> Date: Tue, 20 Jan 2026 18:10:32 +0000 Subject: [PATCH] cmake: Add option for UNITY_SUPPORT64 --- CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f706219..5d77540 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,7 @@ project(unity # Options to Build With Extras ------------------------------------------------- option(UNITY_EXTENSION_FIXTURE "Compiles Unity with the \"fixture\" extension." OFF) option(UNITY_EXTENSION_MEMORY "Compiles Unity with the \"memory\" extension." OFF) +option(UNITY_SUPPORT_INT64 "Enable 64bit integer support. OFF means autodetect." OFF) set(UNITY_EXTENSION_FIXTURE_ENABLED $) set(UNITY_EXTENSION_MEMORY_ENABLED $>) @@ -56,6 +57,10 @@ if(${UNITY_EXTENSION_MEMORY}) message(STATUS "Unity: Building with the memory extension.") endif() +if(${UNITY_SUPPORT_INT64}) + message(STATUS "Unity: Building with 64bit integer support.") +endif() + # Main target ------------------------------------------------------------------ add_library(${PROJECT_NAME} STATIC) add_library(${PROJECT_NAME}::framework ALIAS ${PROJECT_NAME}) @@ -89,6 +94,11 @@ set(${PROJECT_NAME}_PUBLIC_HEADERS $<$:${CMAKE_CURRENT_SOURCE_DIR}/extras/memory/src/unity_memory.h> ) +target_compile_definitions(${PROJECT_NAME} + PUBLIC + $<$:UNITY_SUPPORT_64> +) + set_target_properties(${PROJECT_NAME} PROPERTIES C_STANDARD 11