Revision: 77654
http://sourceforge.net/p/brlcad/code/77654
Author: brlcad
Date: 2020-10-28 06:23:34 +0000 (Wed, 28 Oct 2020)
Log Message:
-----------
probably don't want to keep this long-term, but blather the status of the
pthread library being used for a bit.
Modified Paths:
--------------
brlcad/trunk/CMakeLists.txt
Modified: brlcad/trunk/CMakeLists.txt
===================================================================
--- brlcad/trunk/CMakeLists.txt 2020-10-28 01:56:50 UTC (rev 77653)
+++ brlcad/trunk/CMakeLists.txt 2020-10-28 06:23:34 UTC (rev 77654)
@@ -1868,10 +1868,8 @@
set(CXX_STANDARD_FLAGS "${CXX_STANDARD_FLAGS} -Dclockid_t=clock_t
-pthread")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Dclockid_t=clock_t -pthread")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dclockid_t=clock_t -pthread")
- set(THREADS_PREFER_PTHREAD_FLAG TRUE)
endif (PROBE_PTHREAD_H_CLOCKID_T)
endif (NOT PROBE_PTHREAD_H)
- set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
# -O3/-Ofast can enable -ffast-math which can provoke a stack
# corruption in the shadow computations because of strict aliasing
@@ -2287,8 +2285,15 @@
# Post 3.1 CMake has switched to recommending using an imported target
# and setting a "prefer pthreads" flag - previously we were using the
# CMAKE_THREAD_LIBS_INIT variable
+set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads REQUIRED)
+if(CMAKE_THREAD_LIBS_INIT)
+ message("Using threading library: ${CMAKE_THREAD_LIBS_INIT}")
+else(CMAKE_THREAD_LIBS_INIT)
+ message("Using threading from system library")
+endif(CMAKE_THREAD_LIBS_INIT)
+
# By default, the Threads package doesn't stash any of its values in
# cache. This is inconvenient for debugging, so we set them ourselves.
set(CMAKE_THREAD_LIBS_INIT ${CMAKE_THREAD_LIBS_INIT} CACHE STRING "Threads")
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits