From 0ee077b62873f6b6f8f2b29623903a72a5495712 Mon Sep 17 00:00:00 2001
From: Andre Sailer <andre.philippe.sailer@cern.ch>
Date: Wed, 21 Aug 2019 17:06:19 +0200
Subject: [PATCH] DD4hepConfig: filesystem, add link test for gcc9.1

---
 cmake/DD4hepBuild.cmake | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/cmake/DD4hepBuild.cmake b/cmake/DD4hepBuild.cmake
index 03c83bef6..b8f0c5670 100644
--- a/cmake/DD4hepBuild.cmake
+++ b/cmake/DD4hepBuild.cmake
@@ -677,7 +677,8 @@ MACRO(DD4HEP_SETUP_BOOST_TARGETS)
   # Try to compile with filesystem header linking against different FS libraries
   SET(HAVE_FILESYSTEM False)
   dd4hep_debug("|++> Checking if compiler supports filesystem library")
-  FOREACH(FS_LIB_NAME stdc++fs c++fs )
+  # stdc++fs needed in gcc8, no lib for gcc9.1, c++fs for llvm
+  FOREACH(FS_LIB_NAME stdc++fs "" c++fs )
     dd4hep_debug("|++++> linking against ${FS_LIB_NAME}")
     try_compile(HAVE_FILESYSTEM ${CMAKE_BINARY_DIR}/try ${CMAKE_CURRENT_LIST_DIR}/cmake/TryFileSystem.cpp
       CXX_STANDARD ${CMAKE_CXX_STANDARD}
@@ -687,7 +688,7 @@ MACRO(DD4HEP_SETUP_BOOST_TARGETS)
       )
     dd4hep_debug("|++++> ${HAVE_FS_OUTPUT}")
     IF(HAVE_FILESYSTEM)
-      dd4hep_print("|++> Compiler supports filesystem, linking against ${FS_LIB_NAME}")
+      dd4hep_print("|++> Compiler supports filesystem when linking against ${FS_LIB_NAME}")
       SET(FS_LIBRARIES ${FS_LIB_NAME})
       BREAK()
     ENDIF()
-- 
GitLab