Opendigitalradio / dablin

DAB/DAB+ receiver for Linux (including ETI-NI and EDI AF playback)
GNU General Public License v3.0
123 stars 27 forks source link

Change 7ad2ef5e1a486a574698a3e9e3ef83a7783e62d8 break macOS builds #35

Closed npm-sdr closed 6 years ago

npm-sdr commented 6 years ago

Hi,

I just sync'ed to the top of 'next' branch and found that change 7ad2ef5e1a486a574698a3e9e3ef83a7783e62d8 breaks macOS builds. It appears that clang doesn't support --as-needed flag and also doesn't have libatomic. GCC atomic intrinsics are of course natively available.

Regards, Niro.

basicmaster commented 6 years ago

Hi Niro,

thanks for letting me know. I will add a CMake check whether C++11 atomics are available on the system or not, and only link against libatomic if they are not available. This should solve the issue. And also doesn't require people with atomics support to still install libatomic. I will come back to you.

basicmaster commented 6 years ago

The issue should be fixed with the latest changes on the next branch. Please check if it works for you.

npm-sdr commented 6 years ago

Hi Stefan,

Yes, works on macOS with build-in atomics now.

Thanks, Niro.