diff options
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/cmexpat/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Utilities/cmexpat/CMakeLists.txt b/Utilities/cmexpat/CMakeLists.txt index 9a62b79..81dfee3 100644 --- a/Utilities/cmexpat/CMakeLists.txt +++ b/Utilities/cmexpat/CMakeLists.txt @@ -6,6 +6,12 @@ ELSEIF(CMAKE_C_COMPILER_ID STREQUAL "PathScale") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall") ENDIF() +# Activate POSIX APIs. +if(CMAKE_SYSTEM_NAME MATCHES "^(Linux)$") + add_definitions(-D_DEFAULT_SOURCE -D_BSD_SOURCE) + string(APPEND CMAKE_REQUIRED_DEFINITIONS " -D_DEFAULT_SOURCE -D_BSD_SOURCE") +endif() + include(ConfigureChecks.cmake) configure_file(expat_config.h.cmake expat_config.h @ONLY) |