diff options
author | Chris Robinson <[email protected]> | 2014-04-19 01:02:36 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-04-19 01:02:36 -0700 |
commit | 1d69ec9ce16d1c85aec224a8feae80d7a5ad48ed (patch) | |
tree | 020ea791ed274e15bf06a99efaf4f17694d6f2b0 /CMakeLists.txt | |
parent | 9b685bace50c25fd720799584e78a58d37a55eaa (diff) |
Set -D_GNU_SOURCE=1 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 earlier
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index bf5c37d0..0e159bff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,8 +30,13 @@ IF(WIN32) # that already defines the IDs. It is up to that project to ensure all # required IDs are defined. OPTION(ALSOFT_NO_UID_DEFS "Do not define GUIDs, IIDs, CLSIDs, or PropertyKeys" OFF) +ELSE() + # These are needed on non-Windows systems for extra features + ADD_DEFINITIONS(-D_GNU_SOURCE=1 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700) + SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -D_GNU_SOURCE=1 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700") ENDIF() + OPTION(ALSOFT_BACKEND_OSS "Check for OSS backend" ON) OPTION(ALSOFT_BACKEND_SOLARIS "Check for Solaris backend" ON) OPTION(ALSOFT_BACKEND_SNDIO "Check for SndIO backend" ON) @@ -441,10 +446,6 @@ ENDIF() # Check if we have Windows headers CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H -D_WIN32_WINNT=0x0502) IF(NOT HAVE_WINDOWS_H) - # These are needed on some systems for extra features - ADD_DEFINITIONS(-D_GNU_SOURCE=1 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700) - SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -D_GNU_SOURCE=1 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700") - CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY) IF(NOT HAVE_GETTIMEOFDAY) MESSAGE(FATAL_ERROR "No timing function found!") |