entity-toolkit / entity

New generation astrophysical plasma simulation code with CPU/GPU portability
https://entity-toolkit.github.io/wiki/
Other
27 stars 2 forks source link

fix bug in metadomain.cpp; link library stdc++fs #54

Closed StaticObserver closed 1 month ago

StaticObserver commented 2 months ago

src/framework/metadomain.cpp line 378 INFINITY is float, when precision is double, it causes ambiguity at line 382

linking stdc++fs library in src/CMakelists.txt to void an error at compile time

haykh commented 2 months ago

@StaticObserver could you put the stdc++fs only in the Makefiles that specifically use the <filesystem> library? That would be two CMakeLists.txt, one in src/global/, and the other in src/output/tests/. link privately, i.e., target_link_library(... PRIVATE stdc++fs). I'm a bit worried this library is not ubiquotous among platforms (i might be wrong), because most of the time the linker finds the correct library for the <filesystem> by itself.

ps. I would have done the tweak myself, but i don't have write access to your fork.

haykh commented 2 months ago

also, i tested, and this PR fixes the compilation error in #53.

StaticObserver commented 1 month ago

I'm not very familiar with github, what should I do? Can I change this PR?

BTW, I added you to my fork.

haykh commented 1 month ago

@StaticObserver in general, you can simply push to your own fork, and that will automatically update this PR. But no worries, since you opened access, I can now do myself. thanks again for the PR!