ChimeraTK / cppext

A collection of C++ classes which are quite fundamental and thus considered inside ChimeraTK as an extension of C++.
GNU Lesser General Public License v3.0
2 stars 1 forks source link

Only link with libatomic if it is found #18

Closed smarsching closed 1 year ago

smarsching commented 1 year ago

libatomic does not exist on all systems. For example, modern versions of macOS use Clang / LLVM, where atomics are provided by compiler-rt (the default runtime) and thus no extra library needs to be linked.

By only linking with libatomic when it is found, we can avoid build errors on such systems.

This PR fixes #15.