diff options
| author | Berkus <berkus@gmail.com> | 2014-02-04 14:57:59 +0200 |
|---|---|---|
| committer | Berkus <berkus@gmail.com> | 2014-02-04 14:57:59 +0200 |
| commit | 184ac3fff27d3b9f137c64f2b1a35b6619580580 (patch) | |
| tree | 124b7ca0ce385aea0166782bf0560a023866d976 /CMakeLists.txt | |
| parent | f31af1aa0fe691a643fd6493a97a7d00c1f742e5 (diff) | |
Set some flags depending on compiler and environment.
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 509bf39..273d5c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,19 @@ option(AUDIO_LINUX_PULSE "Build Linux PulseAudio API" OFF) option(AUDIO_UNIX_JACK "Build Unix JACK audio server API" OFF) option(AUDIO_OSX_CORE "Build Mac OSX CoreAudio API" OFF) +if (CMAKE_BUILD_TYPE STREQUAL "Debug") + add_definitions(-D__RTAUDIO_DEBUG__) +endif () + +check_function_exists(gettimeofday HAVE_GETTIMEOFDAY) + +if (HAVE_GETTIMEOFDAY) + add_definitions(-DHAVE_GETTIMEOFDAY) +endif () + +if (CMAKE_COMPILER_IS_GNUCXX) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") +endif (CMAKE_COMPILER_IS_GNUCXX) set(rtaudio_SOURCES RtAudio.cpp) |
