Mercurial > irccd
comparison CMakeLists.txt @ 1116:337b6eb1fa19
cmake: fix build under macOS
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 10 Nov 2021 15:35:49 +0100 |
parents | 8c53096eef1e |
children | 2053790d5e9b |
comparison
equal
deleted
inserted
replaced
1115:b9421902ba71 | 1116:337b6eb1fa19 |
---|---|
47 set(CMAKE_C_STANDARD_REQUIRED On) | 47 set(CMAKE_C_STANDARD_REQUIRED On) |
48 set(CMAKE_C_EXTENSIONS Off) | 48 set(CMAKE_C_EXTENSIONS Off) |
49 set(CMAKE_POSITION_INDEPENDENT_CODE On) | 49 set(CMAKE_POSITION_INDEPENDENT_CODE On) |
50 | 50 |
51 if (CMAKE_C_COMPILER_ID MATCHES "GNU|Clang") | 51 if (CMAKE_C_COMPILER_ID MATCHES "GNU|Clang") |
52 set(CMAKE_C_FLAGS "-Wall -Wextra -pedantic ${CMAKE_C_FLAGS}") | 52 set(CMAKE_C_FLAGS "-Wall -Wextra -pedantic -D_XOPEN_SOURCE=700 ${CMAKE_C_FLAGS}") |
53 endif () | |
54 | |
55 if (CMAKE_SYSTEM_NAME MATCHES "Darwin") | |
56 set(CMAKE_C_FLAGS "-D_DARWIN_C_SOURCE ${CMAKE_C_FLAGS}") | |
53 endif () | 57 endif () |
54 | 58 |
55 include(GNUInstallDirs) | 59 include(GNUInstallDirs) |
56 | 60 |
57 option(IRCCD_WITH_EXAMPLES "Enable example files" On) | 61 option(IRCCD_WITH_EXAMPLES "Enable example files" On) |