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