mirror of
https://github.com/ToruNiina/toml11.git
synced 2024-09-19 15:19:54 +00:00
refactor: move cmake component to where it's used
This commit is contained in:
parent
d4a6fc7953
commit
64cd90637b
@ -11,7 +11,6 @@ option(toml11_TEST_WITH_UBSAN "use LLVM undefined behavior sanitizer" OFF)
|
|||||||
option(TOML11_USE_UNRELEASED_TOML_FEATURES
|
option(TOML11_USE_UNRELEASED_TOML_FEATURES
|
||||||
"use features in toml-lang/toml master while testing" OFF)
|
"use features in toml-lang/toml master while testing" OFF)
|
||||||
|
|
||||||
include(CheckCXXCompilerFlag)
|
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Boolean specifying whether compiler specific extensions are requested.")
|
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Boolean specifying whether compiler specific extensions are requested.")
|
||||||
if(NOT DEFINED CMAKE_CXX_STANDARD)
|
if(NOT DEFINED CMAKE_CXX_STANDARD)
|
||||||
message(FATAL_ERROR "CMAKE_CXX_STANDARD is not defined. \
|
message(FATAL_ERROR "CMAKE_CXX_STANDARD is not defined. \
|
||||||
|
@ -55,6 +55,8 @@ set(TEST_NAMES
|
|||||||
test_extended_conversions
|
test_extended_conversions
|
||||||
)
|
)
|
||||||
|
|
||||||
|
include(CheckCXXCompilerFlag)
|
||||||
|
|
||||||
CHECK_CXX_COMPILER_FLAG("-Wall" COMPILER_SUPPORTS_WALL)
|
CHECK_CXX_COMPILER_FLAG("-Wall" COMPILER_SUPPORTS_WALL)
|
||||||
CHECK_CXX_COMPILER_FLAG("-Wextra" COMPILER_SUPPORTS_WEXTRA)
|
CHECK_CXX_COMPILER_FLAG("-Wextra" COMPILER_SUPPORTS_WEXTRA)
|
||||||
CHECK_CXX_COMPILER_FLAG("-Wpedantic" COMPILER_SUPPORTS_WPEDANTIC)
|
CHECK_CXX_COMPILER_FLAG("-Wpedantic" COMPILER_SUPPORTS_WPEDANTIC)
|
||||||
|
Loading…
Reference in New Issue
Block a user