Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cmake check for LIBRT returns true on MacOS. #164

Open
jtressle opened this issue Feb 17, 2025 · 0 comments
Open

Cmake check for LIBRT returns true on MacOS. #164

jtressle opened this issue Feb 17, 2025 · 0 comments

Comments

@jtressle
Copy link

I've been testing Glomap on a docker ubuntu system and it's been working perfectly. I just tried to compile it for MacOS and iOS, and found an issue with this check:

check_library_exists(rt shm_open "" HAVE_LIBRT)

I'm using the ios-cmake git to configure my cmake, and passing in
-DPLATFORM=MAC_ARM64
or
-DPLATFORM=OS64
for my platforms. For both cases, I'm getting HAVE_LIBRT equal to true.

I did a search and couldn't find librt on my Mac. However, I could be missing something.

I ended up replacing:

check_library_exists(rt shm_open "" HAVE_LIBRT)

with:

# Replace the single check_library_exists with:
if(APPLE)
    set(HAVE_LIBRT FALSE)
else()
    check_library_exists(rt shm_open "" HAVE_LIBRT)
endif()

Should this be updated or do I have a bad environment?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant