diff options
-rw-r--r-- | host/cmake/Modules/FindLIBUSB.cmake | 3 | ||||
-rw-r--r-- | host/lib/convert/CMakeLists.txt | 4 | ||||
-rw-r--r-- | host/lib/utils/CMakeLists.txt | 10 |
3 files changed, 10 insertions, 7 deletions
diff --git a/host/cmake/Modules/FindLIBUSB.cmake b/host/cmake/Modules/FindLIBUSB.cmake index 9c404f68e..f574df916 100644 --- a/host/cmake/Modules/FindLIBUSB.cmake +++ b/host/cmake/Modules/FindLIBUSB.cmake @@ -57,6 +57,9 @@ if(HAVE_LIBUSB_STRERROR) list(APPEND LIBUSB_DEFINITIONS "HAVE_LIBUSB_STRERROR=1") endif(HAVE_LIBUSB_STRERROR) +unset(CMAKE_REQUIRED_INCLUDES) +unset(CMAKE_REQUIRED_LIBRARIES) + include(FindPackageHandleStandardArgs) find_package_handle_standard_args(LIBUSB DEFAULT_MSG LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIRS) mark_as_advanced(LIBUSB_INCLUDE_DIRS LIBUSB_LIBRARIES) diff --git a/host/lib/convert/CMakeLists.txt b/host/lib/convert/CMakeLists.txt index f9128fe16..aee62c82f 100644 --- a/host/lib/convert/CMakeLists.txt +++ b/host/lib/convert/CMakeLists.txt @@ -23,12 +23,12 @@ endif() set(CMAKE_REQUIRED_FLAGS ${EMMINTRIN_FLAGS}) CHECK_INCLUDE_FILE_CXX(emmintrin.h HAVE_EMMINTRIN_H) -set(CMAKE_REQUIRED_FLAGS) +unset(CMAKE_REQUIRED_FLAGS) if(ENABLE_SSSE3) set(CMAKE_REQUIRED_FLAGS ${TMMINTRIN_FLAGS}) CHECK_INCLUDE_FILE_CXX(tmmintrin.h HAVE_TMMINTRIN_H) -set(CMAKE_REQUIRED_FLAGS) +unset(CMAKE_REQUIRED_FLAGS) endif(ENABLE_SSSE3) if(HAVE_EMMINTRIN_H) diff --git a/host/lib/utils/CMakeLists.txt b/host/lib/utils/CMakeLists.txt index 7e95d8c28..fb796efba 100644 --- a/host/lib/utils/CMakeLists.txt +++ b/host/lib/utils/CMakeLists.txt @@ -43,8 +43,6 @@ CHECK_CXX_SOURCE_COMPILES(" " HAVE_WIN_SETTHREADPRIORITY ) - - if(HAVE_PTHREAD_SETSCHEDPARAM) message(STATUS " Priority scheduling supported through pthread_setschedparam.") list(APPEND THREAD_PRIO_DEFS HAVE_PTHREAD_SETSCHEDPARAM) @@ -62,7 +60,6 @@ endif() ######################################################################## set(CMAKE_REQUIRED_LIBRARIES "pthread") - CHECK_CXX_SOURCE_COMPILES(" #include <pthread.h> int main(){ @@ -73,6 +70,7 @@ CHECK_CXX_SOURCE_COMPILES(" } " HAVE_PTHREAD_SETNAME ) +unset(CMAKE_REQUIRED_LIBRARIES) if(CYGWIN) #SCHED_RR non-operational on cygwin @@ -92,6 +90,7 @@ endif() # Setup defines for thread affinitizing ######################################################################## +set(CMAKE_REQUIRED_LIBRARIES "pthread") CHECK_CXX_SOURCE_COMPILES(" #include <pthread.h> int main(){ @@ -102,6 +101,7 @@ CHECK_CXX_SOURCE_COMPILES(" } " HAVE_PTHREAD_SETAFFINITY_NP ) +unset(CMAKE_REQUIRED_LIBRARIES) if(CYGWIN) set(HAVE_PTHREAD_SETAFFINITY_NP False) @@ -115,6 +115,7 @@ CHECK_CXX_SOURCE_COMPILES(" } " HAVE_WIN_SETTHREADAFFINITYMASK ) + if(HAVE_PTHREAD_SETAFFINITY_NP) message(STATUS " Setting thread affinity is supported through pthread_setaffinity_np.") list(APPEND THREAD_PRIO_DEFS HAVE_PTHREAD_SETAFFINITY_NP) @@ -127,7 +128,6 @@ else() list(APPEND THREAD_PRIO_DEFS HAVE_THREAD_SETAFFINITY_DUMMY) endif() - set_source_files_properties( ${CMAKE_CURRENT_SOURCE_DIR}/thread.cpp PROPERTIES COMPILE_DEFINITIONS "${THREAD_PRIO_DEFS}" @@ -149,7 +149,7 @@ CHECK_CXX_SOURCE_COMPILES(" } " HAVE_DLOPEN ) -set(CMAKE_REQUIRED_LIBRARIES) +unset(CMAKE_REQUIRED_LIBRARIES) CHECK_CXX_SOURCE_COMPILES(" #define WIN32_LEAN_AND_MEAN |