diff options
author | Josh Blum <josh@joshknows.com> | 2011-02-22 12:11:41 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-02-22 12:11:41 -0800 |
commit | 8ce6a4853e9e0ef3e18bc30ea00b27ec3a069652 (patch) | |
tree | 8b3630a57a9366c414a672a73e47091797dff566 /host/lib/utils/CMakeLists.txt | |
parent | 3261b89eeb96a6b87bc35c86be3faf78aee569b0 (diff) | |
parent | 9eb19bd9a006c47060b9d0913d2f9d4a49751275 (diff) | |
download | uhd-8ce6a4853e9e0ef3e18bc30ea00b27ec3a069652.tar.gz uhd-8ce6a4853e9e0ef3e18bc30ea00b27ec3a069652.tar.bz2 uhd-8ce6a4853e9e0ef3e18bc30ea00b27ec3a069652.zip |
Merge branch 'usrp2_fw_clock_cleanup' into usrp2_dual_dsp
Diffstat (limited to 'host/lib/utils/CMakeLists.txt')
-rw-r--r-- | host/lib/utils/CMakeLists.txt | 43 |
1 files changed, 31 insertions, 12 deletions
diff --git a/host/lib/utils/CMakeLists.txt b/host/lib/utils/CMakeLists.txt index 743528189..a4d3b2db2 100644 --- a/host/lib/utils/CMakeLists.txt +++ b/host/lib/utils/CMakeLists.txt @@ -24,8 +24,8 @@ ######################################################################## MESSAGE(STATUS "") MESSAGE(STATUS "Configuring priority scheduling...") - INCLUDE(CheckCXXSourceCompiles) + CHECK_CXX_SOURCE_COMPILES(" #include <pthread.h> int main(){ @@ -52,9 +52,10 @@ IF(HAVE_PTHREAD_SETSCHEDPARAM) ELSEIF(HAVE_WIN_SETTHREADPRIORITY) MESSAGE(STATUS " Priority scheduling supported through windows SetThreadPriority.") SET(THREAD_PRIO_DEFS HAVE_WIN_SETTHREADPRIORITY) -ELSE(HAVE_PTHREAD_SETSCHEDPARAM) +ELSE() MESSAGE(STATUS " Priority scheduling not supported.") -ENDIF(HAVE_PTHREAD_SETSCHEDPARAM) + SET(THREAD_PRIO_DEFS HAVE_THREAD_PRIO_DUMMY) +ENDIF() SET_SOURCE_FILES_PROPERTIES( ${CMAKE_CURRENT_SOURCE_DIR}/thread_priority.cpp @@ -66,21 +67,39 @@ SET_SOURCE_FILES_PROPERTIES( ######################################################################## MESSAGE(STATUS "") MESSAGE(STATUS "Configuring module loading...") +INCLUDE(CheckCXXSourceCompiles) -INCLUDE(CheckIncludeFileCXX) -CHECK_INCLUDE_FILE_CXX(dlfcn.h HAVE_DLFCN_H) -CHECK_INCLUDE_FILE_CXX(windows.h HAVE_WINDOWS_H) +SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS}) +CHECK_CXX_SOURCE_COMPILES(" + #include <dlfcn.h> + int main(){ + dlopen(0, 0); + return 0; + } + " HAVE_DLOPEN +) +UNSET(CMAKE_REQUIRED_LIBRARIES) + +CHECK_CXX_SOURCE_COMPILES(" + #include <windows.h> + int main(){ + LoadLibrary(0); + return 0; + } + " HAVE_LOAD_LIBRARY +) -IF(HAVE_DLFCN_H) +IF(HAVE_DLOPEN) MESSAGE(STATUS " Module loading supported through dlopen.") - SET(LOAD_MODULES_DEFS HAVE_DLFCN_H) + SET(LOAD_MODULES_DEFS HAVE_DLOPEN) LIBUHD_APPEND_LIBS(${CMAKE_DL_LIBS}) -ELSEIF(HAVE_WINDOWS_H) +ELSEIF(HAVE_LOAD_LIBRARY) MESSAGE(STATUS " Module loading supported through LoadLibrary.") - SET(LOAD_MODULES_DEFS HAVE_WINDOWS_H) -ELSE(HAVE_DLFCN_H) + SET(LOAD_MODULES_DEFS HAVE_LOAD_LIBRARY) +ELSE() MESSAGE(STATUS " Module loading not supported.") -ENDIF(HAVE_DLFCN_H) + SET(LOAD_MODULES_DEFS HAVE_LOAD_MODULES_DUMMY) +ENDIF() SET_SOURCE_FILES_PROPERTIES( ${CMAKE_CURRENT_SOURCE_DIR}/load_modules.cpp |