File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,17 @@ set (CPACK_PACKAGE_VERSION_MAJOR ${BSON_MAJOR_VERSION})
36
36
set (CPACK_PACKAGE_VERSION_MINOR ${BSON_MINOR_VERSION} )
37
37
38
38
# Enable X/Open 7.0 / POSIX 2008
39
- add_compile_options ($< $< NOT:$< PLATFORM_ID:Windows> > :-D_XOPEN_SOURCE=700> )
39
+ if (NOT WIN32 )
40
+ add_compile_options (-D_XOPEN_SOURCE=700 )
41
+ # Add to CMAKE_REQUIRED_DEFINITIONS to apply to CHECK_SYMBOL_EXISTS.
42
+ set (CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_XOPEN_SOURCE=700" )
43
+ endif ()
44
+ # Enable macOS extensions for strlcpy and arc4random.
45
+ if (APPLE )
46
+ add_compile_options (-D_DARWIN_C_SOURCE=1 )
47
+ # Add to CMAKE_REQUIRED_DEFINITIONS to apply to CHECK_SYMBOL_EXISTS.
48
+ set (CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_DARWIN_C_SOURCE=1" )
49
+ endif ()
40
50
41
51
include (CPack )
42
52
TEST_BIG_ENDIAN (BSON_BIG_ENDIAN )
You can’t perform that action at this time.
0 commit comments