summaryrefslogtreecommitdiffstats
path: root/src/corelib/configure.cmake
diff options
context:
space:
mode:
authorAlbert Astals Cid <albert.astals.cid@kdab.com>2019-02-08 17:04:20 +0100
committerAlbert Astals Cid <albert.astals.cid@kdab.com>2019-02-11 09:26:08 +0000
commit2ce3f440f9e53fc63c0dff63e2b6950a735f7cb1 (patch)
tree1b52ed6dd963612a8189f1da0d65af7f4d0b864b /src/corelib/configure.cmake
parentbb0deccf19116735db3724734b79b89d8dbdf2e3 (diff)
Allow passing libraries to qt_config_compile_test
Fixes cxx11_future and ipc_posix tests Change-Id: I0f3a7b1a0452724c07198a87c2fc25344e7451eb Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/corelib/configure.cmake')
-rw-r--r--src/corelib/configure.cmake14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake
index 4c40aa1c28..2f5c543e56 100644
--- a/src/corelib/configure.cmake
+++ b/src/corelib/configure.cmake
@@ -112,8 +112,13 @@ int pipes[2];
")
# cxx11_future
+if (UNIX)
+ set(CXX11_FUTURE_TEST_LIBRARIES pthread)
+endif()
qt_config_compile_test(cxx11_future
LABEL "C++11 <future>"
+ LIBRARIES ${CXX11_FUTURE_TEST_LIBRARIES}
+ CODE
"
#include <future>
@@ -126,7 +131,7 @@ std::future<int> f = std::async([]() { return 42; });
/* END TEST: */
return 0;
}
-"# FIXME: qmake: unix:LIBS += -lpthread
+"
)
# eventfd
@@ -190,8 +195,13 @@ shmctl(0, 0, (struct shmid_ds *)(0));
")
# ipc_posix
+if (LINUX)
+ set(IPC_POSIX_TEST_LIBRARIES pthread rt)
+endif()
qt_config_compile_test(ipc_posix
LABEL "POSIX IPC"
+ LIBRARIES ${IPC_POSIX_TEST_LIBRARIES}
+ CODE
"
#include <sys/types.h>
#include <sys/mman.h>
@@ -208,7 +218,7 @@ shm_unlink(\"test\");
/* END TEST: */
return 0;
}
-"# FIXME: qmake: linux: LIBS += -lpthread -lrt
+"
)
# linkat