diff options
author | Brad King <brad.king@kitware.com> | 2022-11-10 16:07:14 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-11-10 16:07:14 -0500 |
commit | 0325f047625b1cfe035668be6dc8d96a4d8775e7 (patch) | |
tree | 3b2d24f32acad6b6470fbddece62d619b3c075bf | |
parent | 2780c3c683ae3e11807c897dc519a49d8fd2c63f (diff) | |
parent | 019af622941ba93470c96cd148d4ca26941aafd0 (diff) | |
download | cmake-0325f047625b1cfe035668be6dc8d96a4d8775e7.tar.gz |
Merge branch 'expat-c-no-extensions' into release-3.24
Merge-request: !7899
-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 9a62b79af9..81dfee3124 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) |