Skip to content

Commit

Permalink
Merge pull request #1703 from willend/main
Browse files Browse the repository at this point in the history
Add  -D_DARWIN_C_SOURCE on macOS
  • Loading branch information
willend authored Sep 19, 2024
2 parents 97d49f8 + be7982a commit 5590803
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmake/Modules/PlatformDefaults.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ function( detect_platform_variables resultvarname )
#Attempt to provide the relevant -isysroot on macOS, possibly found by cmake
set(MCCODE_CFLAGS "${MCCODE_CFLAGS} -isysroot ${CMAKE_OSX_SYSROOT}")
endif()
if ( DARWIN )
set(MCCODE_CFLAGS "${MCCODE_CFLAGS} -D_DARWIN_C_SOURCE")
endif()
if ( MCCODE_BUILD_CONDA_PKG )
if ( WINDOWS )
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
Expand Down

0 comments on commit 5590803

Please sign in to comment.