From 7dcbe66a85c38c1e46a756dc85818bc3f66db844 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Mon, 3 Jul 2023 07:00:03 -0400 Subject: [PATCH] Flip option from Negative to Positive, per review feedback --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 32fb8af24..2c67978dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,7 +50,7 @@ target_include_directories(pegtl INTERFACE target_compile_features(pegtl INTERFACE cxx_std_17) option(PEGTL_USE_BOOST_FILESYSTEM "Override the auto-detection of std::filesystem and use Boost.Filesystem" OFF) -option(PEGTL_NO_STD_FILESYSTEM "Don't link to any std::filesystem; file operations will not work" OFF) +option(PEGTL_USE_FILESYSTEM "Use available implementation of std::filesystem (std::, std::experiemntal, or Boost)" ON) # Try compiling a test program with std::filesystem or one of its alternatives function(check_filesystem_impl FILESYSTEM_HEADER FILESYSTEM_NAMESPACE OPTIONAL_LIBS OUT_RESULT) @@ -83,9 +83,9 @@ function(check_filesystem_impl FILESYSTEM_HEADER FILESYSTEM_NAMESPACE OPTIONAL_L set(${OUT_RESULT} ${TEST_RESULT} PARENT_SCOPE) endfunction() -if (PEGTL_NO_STD_FILESYSTEM) - target_compile_definitions(${PROJECT_NAME} INTERFACE TAO_PEGTL_NO_STD_FILESYSTEM) - message(STATUS "Skipping std::filesystem in PEGTL; File operations will not work or compile.") +if (NOT PEGTL_USE_FILESYSTEM) + target_compile_definitions(${PROJECT_NAME} INTERFACE TAO_PEGTL_NO_FILESYSTEM) + message(STATUS "Skipping std::filesystem (or variant) in PEGTL; File operations will not work or compile.") elseif (PEGTL_USE_BOOST_FILESYSTEM) # Force the use of Boost.Filesystem: #include // boost::filesystem find_package(Boost REQUIRED COMPONENTS filesystem)