From 64cd90637b3cea6d902fd3c69c7578a3361d6d60 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Wed, 20 Mar 2024 22:35:03 +0900 Subject: [PATCH] refactor: move cmake component to where it's used --- CMakeLists.txt | 1 - tests/CMakeLists.txt | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aaf51b5..fa8e635 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,6 @@ option(toml11_TEST_WITH_UBSAN "use LLVM undefined behavior sanitizer" OFF) option(TOML11_USE_UNRELEASED_TOML_FEATURES "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.") if(NOT DEFINED CMAKE_CXX_STANDARD) message(FATAL_ERROR "CMAKE_CXX_STANDARD is not defined. \ diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 332eaa8..8253359 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -55,6 +55,8 @@ set(TEST_NAMES test_extended_conversions ) +include(CheckCXXCompilerFlag) + CHECK_CXX_COMPILER_FLAG("-Wall" COMPILER_SUPPORTS_WALL) CHECK_CXX_COMPILER_FLAG("-Wextra" COMPILER_SUPPORTS_WEXTRA) CHECK_CXX_COMPILER_FLAG("-Wpedantic" COMPILER_SUPPORTS_WPEDANTIC)