fix: enable to control macro definition

This commit is contained in:
ToruNiina 2021-04-02 17:21:25 +09:00
parent c7d6d793cb
commit db1f42b5da
2 changed files with 14 additions and 1 deletions

View File

@ -40,7 +40,13 @@ endif()
if(MSVC)
add_definitions("/Zc:__cplusplus") # define __cplusplus value correctly
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()
# Set some common directories

View File

@ -7,6 +7,11 @@
#define TOML11_CONCATENATE_AUX(x, y) 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
@ -111,4 +116,6 @@
}; \
} /* toml */
#endif// TOML11_WITHOUT_DEFINE_NON_INTRUSIVE
#endif// TOML11_MACROS_HPP