diff options
author | Philip Balister <philip@opensdr.com> | 2011-02-21 04:22:10 -0800 |
---|---|---|
committer | Philip Balister <philip@opensdr.com> | 2011-02-21 04:22:10 -0800 |
commit | 9563275e85d794e66d0aed4fb1c446d3a20b1615 (patch) | |
tree | 4d2d10ae728d7dd1303e6d2466d0f2a8518ae238 /host/lib/utils | |
parent | 7a786b4eca75ba844a8c79798a5b245b445527da (diff) | |
parent | 4787c77bb089bf50a47207bbad55bd65a44769e4 (diff) | |
download | uhd-9563275e85d794e66d0aed4fb1c446d3a20b1615.tar.gz uhd-9563275e85d794e66d0aed4fb1c446d3a20b1615.tar.bz2 uhd-9563275e85d794e66d0aed4fb1c446d3a20b1615.zip |
Merge branch 'next' of ettus.sourcerepo.com:ettus/uhdpriv into next
Diffstat (limited to 'host/lib/utils')
-rw-r--r-- | host/lib/utils/CMakeLists.txt | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/host/lib/utils/CMakeLists.txt b/host/lib/utils/CMakeLists.txt index 5fa5b4d6d..743528189 100644 --- a/host/lib/utils/CMakeLists.txt +++ b/host/lib/utils/CMakeLists.txt @@ -48,14 +48,19 @@ CHECK_CXX_SOURCE_COMPILES(" IF(HAVE_PTHREAD_SETSCHEDPARAM) MESSAGE(STATUS " Priority scheduling supported through pthread_setschedparam.") - ADD_DEFINITIONS(-DHAVE_PTHREAD_SETSCHEDPARAM) + SET(THREAD_PRIO_DEFS HAVE_PTHREAD_SETSCHEDPARAM) ELSEIF(HAVE_WIN_SETTHREADPRIORITY) MESSAGE(STATUS " Priority scheduling supported through windows SetThreadPriority.") - ADD_DEFINITIONS(-DHAVE_WIN_SETTHREADPRIORITY) + SET(THREAD_PRIO_DEFS HAVE_WIN_SETTHREADPRIORITY) ELSE(HAVE_PTHREAD_SETSCHEDPARAM) MESSAGE(STATUS " Priority scheduling not supported.") ENDIF(HAVE_PTHREAD_SETSCHEDPARAM) +SET_SOURCE_FILES_PROPERTIES( + ${CMAKE_CURRENT_SOURCE_DIR}/thread_priority.cpp + PROPERTIES COMPILE_DEFINITIONS "${THREAD_PRIO_DEFS}" +) + ######################################################################## # Setup defines for module loading ######################################################################## @@ -68,15 +73,20 @@ CHECK_INCLUDE_FILE_CXX(windows.h HAVE_WINDOWS_H) IF(HAVE_DLFCN_H) MESSAGE(STATUS " Module loading supported through dlopen.") - ADD_DEFINITIONS(-DHAVE_DLFCN_H) + SET(LOAD_MODULES_DEFS HAVE_DLFCN_H) LIBUHD_APPEND_LIBS(${CMAKE_DL_LIBS}) ELSEIF(HAVE_WINDOWS_H) MESSAGE(STATUS " Module loading supported through LoadLibrary.") - ADD_DEFINITIONS(-DHAVE_WINDOWS_H) + SET(LOAD_MODULES_DEFS HAVE_WINDOWS_H) ELSE(HAVE_DLFCN_H) MESSAGE(STATUS " Module loading not supported.") ENDIF(HAVE_DLFCN_H) +SET_SOURCE_FILES_PROPERTIES( + ${CMAKE_CURRENT_SOURCE_DIR}/load_modules.cpp + PROPERTIES COMPILE_DEFINITIONS "${LOAD_MODULES_DEFS}" +) + ######################################################################## # Append sources ######################################################################## |