From 0ae6a0589fd5d71d7bac389128c7245c7629c715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E9=98=B3?= Date: Thu, 29 Aug 2024 20:04:27 +0800 Subject: [PATCH] fix CMakeLists.txt --- CMakeLists.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d4ffcd..0363fbd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,31 +62,40 @@ else() endif() # 宏开关 +# default: auto, following the compiler pre-defined macros if(MTFMT_RT_USE_DIV) target_compile_definitions(${TARGET_NAME} PRIVATE _MSTR_USE_HARDWARE_DIV) endif() +# default: 0 if(MTFMT_RT_USE_MALLOC) target_compile_definitions(${TARGET_NAME} PRIVATE _MSTR_USE_MALLOC) endif() +# default: 0 if(MTFMT_RT_USE_STDOUT) target_compile_definitions(${TARGET_NAME} PRIVATE _MSTR_USE_STD_IO) endif() +# default: 0 if(MTFMT_RT_USE_ASSERT) target_compile_definitions(${TARGET_NAME} PRIVATE _MSTR_RUNTIME_ASSERT) target_compile_definitions(${TARGET_NAME} PRIVATE _MSTR_RUNTIME_CTRLFLOW_MARKER) endif() +# default: 1 if(MTFMT_RT_USE_UTF8) - target_compile_definitions(${TARGET_NAME} PRIVATE _MSTR_USE_UTF_8) + target_compile_definitions(${TARGET_NAME} PRIVATE _MSTR_USE_UTF_8=1) +else() + target_compile_definitions(${TARGET_NAME} PRIVATE _MSTR_USE_UTF_8=0) endif() +# default: 0 if(MTFMT_RT_USE_FP32) target_compile_definitions(${TARGET_NAME} PRIVATE _MSTR_USE_FP_FLOAT32) endif() +# default: auto, following the compiler pre-defined macros if(MTFMT_RT_USE_FP64) target_compile_definitions(${TARGET_NAME} PRIVATE _MSTR_USE_FP_FLOAT64) endif()