mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 14:18:31 +09:00
[Fix] (CMake): make MSVC properly report __cplusplus macro
This commit is contained in:
@@ -31,6 +31,7 @@ endif()
|
|||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||||
add_compile_options(/Zc:preprocessor)
|
add_compile_options(/Zc:preprocessor)
|
||||||
|
add_compile_options(/Zc:__cplusplus)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
enable_language(CXX)
|
enable_language(CXX)
|
||||||
|
|||||||
@@ -44,6 +44,11 @@
|
|||||||
#define MOBILEGL_LOG_ENABLE_FILE 1
|
#define MOBILEGL_LOG_ENABLE_FILE 1
|
||||||
#define MOBILEGL_LOG_ENABLE_ANDROID 1
|
#define MOBILEGL_LOG_ENABLE_ANDROID 1
|
||||||
|
|
||||||
|
// Require C++23
|
||||||
|
#if __cplusplus >= 202302L
|
||||||
|
#define MOBILEGL_LOG_ENABLE_STACKTRACE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __ANDROID__
|
#ifdef __ANDROID__
|
||||||
#define MOBILEGL_LOG_FILE_PATH "/sdcard/MG/latest.log"
|
#define MOBILEGL_LOG_FILE_PATH "/sdcard/MG/latest.log"
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user