mirror of https://github.com/CGAL/cgal
workaround absence of <filesystem>
This commit is contained in:
parent
b0ac1d1c19
commit
fcbf327b16
|
|
@ -3,6 +3,19 @@
|
||||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
// work around for old compilers (Apple clang < 11 for example)
|
||||||
|
#define HAS_FILESYSTEM 1
|
||||||
|
#if (__has_include)
|
||||||
|
#if !__has_include(<filesystem>)
|
||||||
|
#undef HAS_FILESYSTEM
|
||||||
|
#define HAS_FILESYSTEM 0
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if HAS_FILESYSTEM
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
|
@ -80,3 +93,13 @@ int main() {
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
std::cout << "Warning: filesystem feature is not present on the system, nothing will be tested\n";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue