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)