mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-12-16 03:08:52 +08:00
fix: enable to control macro definition
This commit is contained in:
@@ -40,7 +40,13 @@ endif()
|
|||||||
if(MSVC)
|
if(MSVC)
|
||||||
add_definitions("/Zc:__cplusplus") # define __cplusplus value correctly
|
add_definitions("/Zc:__cplusplus") # define __cplusplus value correctly
|
||||||
add_definitions("/utf-8") # enable to use u8"" literal
|
add_definitions("/utf-8") # enable to use u8"" literal
|
||||||
add_definitions("/Zc:preprocessor")
|
if(MSVC_VERSION LESS 1910)
|
||||||
|
add_definitions(-DTOML11_WITHOUT_DEFINE_NON_INTRUSIVE)
|
||||||
|
elseif(MSVC_VERSION LESS 1920)
|
||||||
|
add_definitions("/experimental:preprocessor") # MSVC 2017
|
||||||
|
else()
|
||||||
|
add_definitions("/Zc:preprocessor") # MSVC 2019
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Set some common directories
|
# Set some common directories
|
||||||
|
|||||||
@@ -7,6 +7,11 @@
|
|||||||
#define TOML11_CONCATENATE_AUX(x, y) x##y
|
#define TOML11_CONCATENATE_AUX(x, y) x##y
|
||||||
#define TOML11_CONCATENATE(x, y) TOML11_CONCATENATE_AUX(x, y)
|
#define TOML11_CONCATENATE(x, y) TOML11_CONCATENATE_AUX(x, y)
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// TOML11_DEFINE_CONVERSION_NON_INTRUSIVE
|
||||||
|
|
||||||
|
#ifndef TOML11_WITHOUT_DEFINE_NON_INTRUSIVE
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// TOML11_ARGS_SIZE
|
// TOML11_ARGS_SIZE
|
||||||
|
|
||||||
@@ -111,4 +116,6 @@
|
|||||||
}; \
|
}; \
|
||||||
} /* toml */
|
} /* toml */
|
||||||
|
|
||||||
|
#endif// TOML11_WITHOUT_DEFINE_NON_INTRUSIVE
|
||||||
|
|
||||||
#endif// TOML11_MACROS_HPP
|
#endif// TOML11_MACROS_HPP
|
||||||
|
|||||||
Reference in New Issue
Block a user