mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-24 05:55:43 -04:00

As I move towards implementing std::filesystem, there is a need to make the existing tests run against both the std and experimental versions. Additionally, it's helpful to allow running the tests against other implementations of filesystem. This patch converts the test to easily target either. First, it adds a filesystem_include.hpp header which is soley responsible for selecting and including the correct implementation. Second, it converts existing tests to use this header instead of including filesystem directly. llvm-svn: 328475
19 lines
427 B
C++
19 lines
427 B
C++
#ifndef TEST_SUPPORT_FILESYSTEM_INCLUDE_HPP
|
|
#define TEST_SUPPORT_FILESYSTEM_INCLUDE_HPP
|
|
|
|
#include <ciso646>
|
|
// Test against std::filesystem for STL's other than libc++
|
|
#ifndef _LIBCPP_VERSION
|
|
#define TEST_INCLUDE_STD_FILESYSTEM
|
|
#endif
|
|
|
|
#ifdef TEST_INCLUDE_STD_FILESYSTEM
|
|
#include <filesystem>
|
|
namespace fs = std::filesystem;
|
|
#else
|
|
#include <experimental/filesystem>
|
|
namespace fs = std::experimental::filesystem;
|
|
#endif
|
|
|
|
#endif
|