From 85cd51872e30f7d672b9f18d554a417d91c6dc71 Mon Sep 17 00:00:00 2001 From: Febbe Date: Fri, 4 Sep 2020 03:47:24 +0200 Subject: [PATCH] fixup linking problems, when using std::filesystem::relative in gcc7/g++7 --- cmake/find/FindFilesystem.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/find/FindFilesystem.cmake b/cmake/find/FindFilesystem.cmake index 1a1bf1e9..bc4c442a 100644 --- a/cmake/find/FindFilesystem.cmake +++ b/cmake/find/FindFilesystem.cmake @@ -187,7 +187,8 @@ if (CXX_FILESYSTEM_HAVE_FS) int main() { auto cwd = @CXX_FILESYSTEM_NAMESPACE@::current_path(); - return cwd.string().size(); + auto relative = @CXX_FILESYSTEM_NAMESPACE@::relative(cwd,cwd); + return relative.string().size(); } ]] code @ONLY)