mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-12-16 03:08:52 +08:00
Merge branch 'main' into v4_1_0
This commit is contained in:
@@ -1,5 +1,18 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(toml11 LANGUAGES CXX VERSION 4.0.0)
|
||||
|
||||
# project_source_dir has not been set yet
|
||||
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/include/toml11/version.hpp" TOML11_MAJOR_VERSION_STRING
|
||||
REGEX "#define TOML11_VERSION_MAJOR ([0-9]+)")
|
||||
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/include/toml11/version.hpp" TOML11_MINOR_VERSION_STRING
|
||||
REGEX "#define TOML11_VERSION_MINOR ([0-9]+)")
|
||||
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/include/toml11/version.hpp" TOML11_PATCH_VERSION_STRING
|
||||
REGEX "#define TOML11_VERSION_PATCH ([0-9]+)")
|
||||
|
||||
string(REGEX REPLACE "#define TOML11_VERSION_MAJOR ([0-9]+)" "\\1" TOML11_VERSION_MAJOR "${TOML11_MAJOR_VERSION_STRING}")
|
||||
string(REGEX REPLACE "#define TOML11_VERSION_MINOR ([0-9]+)" "\\1" TOML11_VERSION_MINOR "${TOML11_MINOR_VERSION_STRING}")
|
||||
string(REGEX REPLACE "#define TOML11_VERSION_PATCH ([0-9]+)" "\\1" TOML11_VERSION_PATCH "${TOML11_PATCH_VERSION_STRING}")
|
||||
|
||||
project(toml11 LANGUAGES CXX VERSION "${TOML11_VERSION_MAJOR}.${TOML11_VERSION_MINOR}.${TOML11_VERSION_PATCH}")
|
||||
|
||||
include(CMakeDependentOption)
|
||||
include(CTest)
|
||||
|
||||
@@ -95,7 +95,7 @@ struct has_specialized_into_impl
|
||||
template<typename T>
|
||||
static std::false_type check(...);
|
||||
template<typename T, std::size_t S = sizeof(::toml::into<T>)>
|
||||
static std::true_type check(::toml::from<T>*);
|
||||
static std::true_type check(::toml::into<T>*);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#define TOML11_VERSION_MAJOR 4
|
||||
#define TOML11_VERSION_MINOR 0
|
||||
#define TOML11_VERSION_PATCH 0
|
||||
#define TOML11_VERSION_PATCH 1
|
||||
|
||||
#ifndef __cplusplus
|
||||
# error "__cplusplus is not defined"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#define TOML11_VERSION_MAJOR 4
|
||||
#define TOML11_VERSION_MINOR 0
|
||||
#define TOML11_VERSION_PATCH 0
|
||||
#define TOML11_VERSION_PATCH 1
|
||||
|
||||
#ifndef __cplusplus
|
||||
# error "__cplusplus is not defined"
|
||||
|
||||
Reference in New Issue
Block a user