From c657f8eb4a86a83bab0f025d1309c0b1fc61bfd5 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Fri, 17 Nov 2017 11:58:26 +0100 Subject: [PATCH] Added pthreads support --- files/pthreads.modulemap | 1 + tests/compilation/pthreads/CMakeLists.txt | 8 ++++++++ tests/compilation/pthreads/NEEDS_PCMS | 1 + tests/compilation/pthreads/main.cpp | 4 ++++ 4 files changed, 14 insertions(+) create mode 100644 files/pthreads.modulemap create mode 100644 tests/compilation/pthreads/CMakeLists.txt create mode 100644 tests/compilation/pthreads/NEEDS_PCMS create mode 100644 tests/compilation/pthreads/main.cpp diff --git a/files/pthreads.modulemap b/files/pthreads.modulemap new file mode 100644 index 00000000..dbfdaae5 --- /dev/null +++ b/files/pthreads.modulemap @@ -0,0 +1 @@ +module pthread [system] { header "pthread.h" export * } diff --git a/tests/compilation/pthreads/CMakeLists.txt b/tests/compilation/pthreads/CMakeLists.txt new file mode 100644 index 00000000..22007d82 --- /dev/null +++ b/tests/compilation/pthreads/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.0) +project (pthreads-test) + +find_package(Threads) + +include(clang-modules/ClangModules.cmake) + +add_executable(pthreads-test main.cpp) diff --git a/tests/compilation/pthreads/NEEDS_PCMS b/tests/compilation/pthreads/NEEDS_PCMS new file mode 100644 index 00000000..820d55f0 --- /dev/null +++ b/tests/compilation/pthreads/NEEDS_PCMS @@ -0,0 +1 @@ +pthreads diff --git a/tests/compilation/pthreads/main.cpp b/tests/compilation/pthreads/main.cpp new file mode 100644 index 00000000..c4b488c6 --- /dev/null +++ b/tests/compilation/pthreads/main.cpp @@ -0,0 +1,4 @@ +#include + +int main(int, char**){ +}