Skip to content

Commit

Permalink
Use CMAKE_REQUIRED_FLAGS instead of CMAKE_CXX_FLAGS for std::filesyst…
Browse files Browse the repository at this point in the history
…em::path check
  • Loading branch information
fredemmott committed Dec 30, 2023
1 parent a153ca4 commit 7274ad4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Vendor/filesystem.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ include(FetchContent)
include(CheckCXXSourceCompiles)

if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++20 /Zc:__cplusplus")
set(CMAKE_REQUIRED_FLAGS "/std:c++20 /Zc:__cplusplus")
endif()

# MacOS < 10.15 has `<filesystem>` but not `std::filesystem::path`
check_cxx_source_compiles("
#include <filesystem>
Expand Down

0 comments on commit 7274ad4

Please sign in to comment.