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

Build failed. Should we add -D_XOPEN_SOURCE_EXTENDED in CMakeLists.txt? #167

Open
shengyang998 opened this issue Feb 26, 2023 · 5 comments
Labels

Comments

@shengyang998
Copy link

Build failed on macOS 13.1.

After adding -D_XOPEN_SOURCE_EXTENDED, the build is succeeded.
FYI: https://stackoverflow.com/questions/5378778/what-does-d-xopen-source-do-mean

@abishekvashok
Copy link
Owner

Yes please :)

@illegitimate-egg
Copy link

Where does one put this in CMakeLists.txt?

@abishekvashok
Copy link
Owner

Yes

@illegitimate-egg
Copy link

I guess I should clarify what I meant. I don't use cmake personally. I was wondering where I should put the -D_XOPEN_SOURCE_EXTENDED flag in the CMakeLists.txt file

@abishekvashok
Copy link
Owner

We need to something like:

  set(CMAKE_C_FLAGS "-D_XOPEN_SOURCE=700")

please see https://cmake.org/cmake/help/latest/guide/tutorial/index.html for more information about cmake :)

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

No branches or pull requests

3 participants