cmatrix icon indicating copy to clipboard operation
cmatrix copied to clipboard

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

Open shengyang998 opened this issue 1 year ago • 5 comments

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

shengyang998 avatar Feb 26 '23 15:02 shengyang998

Yes please :)

abishekvashok avatar Feb 28 '23 12:02 abishekvashok

Where does one put this in CMakeLists.txt?

illegitimate-egg avatar Apr 10 '23 20:04 illegitimate-egg

Yes

abishekvashok avatar Apr 11 '23 05:04 abishekvashok

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

illegitimate-egg avatar Apr 11 '23 07:04 illegitimate-egg

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 :)

abishekvashok avatar Apr 11 '23 07:04 abishekvashok