summaryrefslogtreecommitdiffstats
path: root/src/corelib/configure.cmake
diff options
context:
space:
mode:
authorAmir Masoud Abdol <amir.abdol@qt.io>2023-02-09 16:13:30 +0100
committerAmir Masoud Abdol <amir.abdol@qt.io>2023-02-10 22:44:11 +0100
commit75ca710370aadf5ad230f9b9059cc8295927430d (patch)
tree05603ecdc23349f8cc7c4ec03eca31ce99d9cc49 /src/corelib/configure.cmake
parent86d8d67146e20ac9d342a9d8c6901b35c899427e (diff)
Improve FindWrapRt, and SHM detection
Apparently, more and more librt functionality are being moved to glibc these days, e.g., clock_gettime, clock_getres, clock_settime, clock_getcpuclockid, clock_nanosleep. As Thiago mentioned, in face, all librt functions are moving into glibc, but unlike the clock_* functions that I can see are ported from 2.17+, I cannot find out when and what functions are already ported. So, here, I added a second test which tries to explicitly look for shm_* functions, if they are there, as well as the clock_* function, then we are more confident that we actually have a useful the libRt in the system. Also, making the FEATURE_posix_SHM depends on UNIX. Pick-to: 6.5 Fixes: QTBUG-111049 Change-Id: I08b7f4656ecd9313b552fb05ca7096f5b987b95a Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/configure.cmake')
-rw-r--r--src/corelib/configure.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake
index b4a040fb29..d84a52132e 100644
--- a/src/corelib/configure.cmake
+++ b/src/corelib/configure.cmake
@@ -331,7 +331,7 @@ int main(void)
")
if (LINUX)
- set(ipc_posix_TEST_LIBRARIES pthread rt)
+ set(ipc_posix_TEST_LIBRARIES pthread WrapRt::WrapRt)
endif()
qt_config_compile_test(posix_shm
LABEL "POSIX shared memory"
@@ -692,7 +692,7 @@ qt_feature("posix_sem" PRIVATE
)
qt_feature("posix_shm" PRIVATE
LABEL "POSIX shared memory"
- CONDITION TEST_posix_shm
+ CONDITION TEST_posix_shm AND UNIX
)
qt_feature("qqnx_pps" PRIVATE
LABEL "PPS"