This is an automated email from the ASF dual-hosted git repository. borisk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/xerces-c.git
commit f789fcdd4ee2e48d0700d9e2eaf10d59428d616e Author: Roger Leigh <rle...@apache.org> AuthorDate: Fri Oct 12 12:02:58 2018 +0000 cmake: Allow thread checks to fail and fall back to nothreads Closes: #2155 git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@1843653 13f79535-47bb-0310-9956-ffa450edef68 --- cmake/XercesMutexMgrSelection.cmake | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cmake/XercesMutexMgrSelection.cmake b/cmake/XercesMutexMgrSelection.cmake index 2f1d71c..ad69884 100644 --- a/cmake/XercesMutexMgrSelection.cmake +++ b/cmake/XercesMutexMgrSelection.cmake @@ -19,11 +19,15 @@ # mutexmgr selection -option(threads "Threading support" ON) +set(xerces_thread_default ON) +find_package(Threads) +if(NOT TARGET Threads::Threads) + set(xerces_thread_default ON) +endif() -include(CheckCXXSourceCompiles) +option(threads "Threading support" ${xerces_thread_default}) -find_package(Threads REQUIRED) +include(CheckCXXSourceCompiles) function(thread_test outvar) set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) --------------------------------------------------------------------- To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: c-dev-h...@xerces.apache.org