diff --git a/CMakeLists.txt b/CMakeLists.txt index 34598f81..d75d1357 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,7 @@ endif() if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") add_compile_options(/Zc:preprocessor) + add_compile_options(/Zc:__cplusplus) endif() enable_language(CXX) diff --git a/MobileGL/Defines.h b/MobileGL/Defines.h index 2cd7d5f2..564bdc5c 100644 --- a/MobileGL/Defines.h +++ b/MobileGL/Defines.h @@ -44,6 +44,11 @@ #define MOBILEGL_LOG_ENABLE_FILE 1 #define MOBILEGL_LOG_ENABLE_ANDROID 1 +// Require C++23 +#if __cplusplus >= 202302L +#define MOBILEGL_LOG_ENABLE_STACKTRACE 1 +#endif + #ifdef __ANDROID__ #define MOBILEGL_LOG_FILE_PATH "/sdcard/MG/latest.log" #else