[cmake][interop] add dynamic check for libstdc++fs#21138
[cmake][interop] add dynamic check for libstdc++fs#21138aaronj0 wants to merge 1 commit intoroot-project:masterfrom
Conversation
03f6efe to
bd35dfe
Compare
… against libstdc++fs
7702434 to
28a646c
Compare
Test Results 22 files 22 suites 3d 9h 0m 33s ⏱️ For more details on these failures, see this check. Results for commit 28a646c. |
|
I tried to comment on the old commit, but that doesn't seem to show up 😒 The probable reason the check didn't work in CppInterOp integrated into ROOT is that we never reset |
hahnjo
left a comment
There was a problem hiding this comment.
from #20774 (comment):
Looking at the code again, the only place using
<filesystem>is https://github.com/compiler-research/CppInterOp/blob/4cc7ff5e9af52e6535d3c8f33e8fce7b6c8120b4/lib/CppInterOp/CppInterOp.cpp#L3357-L3358. Instead I think you should just callllvm::sys::fs::is_directory, which you are already using throughout the file...
|
Closing in favour of compiler-research/CppInterOp#797 that should no longer require linking against stdc++fs |
Based on 957ac33: Looking at the compiler version is not enough to know if we really need to link against stdc++fs:"Whether linking with libstdc++fs is needed depends on the version of libstdc++, not on the compiler. For example, it is possible to use an older library with a newer compiler, or with another compiler that follows a different versioning scheme (for example Clang)."
594a2b8 broke some Clang builds as the need to link against stdc++fs was not a GCC issue, but to do with the libstdc++ version. This adds a dynamic check in the same fashion as in ROOT, but in CppInterOp so that standalone builds do not suffer from the same issue.
The same dynamic check if a source compiles doesn't seem to work in CppInterOp's cmake. I will investigate further, for now updating the check to use ROOT_NEED_STDCXXFS
@hahnjo can you test if this commit fixes your build?