aboutsummaryrefslogtreecommitdiff
path: root/cmake
AgeCommit message (Collapse)Author
2019-08-15[OpenMP] Enable warning about "implicit fallthrough"Jonas Hahnfeld
Fix last warned location in ittnotify_static.cpp using the defined macro KMP_FALLTHROUGH(). Differential Revision: https://reviews.llvm.org/D65871 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@369003 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-15[OpenMP] Turn on -Wall compiler warnings by defaultJonas Hahnfeld
Instead, maintain a list of disabled options to still build libomp and libomptarget without warnings. This includes -Wno-error and -Wno-pedantic to silence warnings that LLVM enables when building in-tree. I tested the following compilers: * Clang 6.0, 7.0, 8.0 * GCC 4.8.5 (CentOS 7), GCC 6, 7, 8, 9 * Intel Compiler 16, 17, 18, 19 RFC thread on openmp-dev mailing list: http://lists.llvm.org/pipermail/openmp-dev/2019-August/002668.html Differential Revision: https://reviews.llvm.org/D65867 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@368999 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-05After rL357618, quote ${CMAKE_THREAD_LIBS_INIT} so CMake does notDimitry Andric
complain when the variable is empty. Fixes PR 41401. git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@357828 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-03Ensure correct pthread flags and libraries are usedDimitry Andric
On most platforms, certain compiler and linker flags have to be passed when using pthreads, otherwise linking against libomp.so might fail with undefined references to several pthread functions. Use CMake's `find_package(Threads)` to determine these for standalone builds, or take them (and optionally modify them) from the top-level LLVM cmake files. Also, On FreeBSD, ensure that libomp.so is linked against libm.so, similar to NetBSD. Adjust test cases with hardcoded `-lpthread` flag to use the common build flags, which should now have the required pthread flags. Reviewers: emaste, jlpeyton, krytarowski, mgorny, protze.joachim, Hahnfeld Reviewed By: Hahnfeld Subscribers: AndreyChurbanov, tra, EricWF, Hahnfeld, jfb, jdoerfert, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D59451 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@357618 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-04[build] Rename clang-headers to clang-resource-headersShoaib Meenai
Summary: The current install-clang-headers target installs clang's resource directory headers. This is different from the install-llvm-headers target, which installs LLVM's API headers. We want to introduce the corresponding target to clang, and the natural name for that new target would be install-clang-headers. Rename the existing target to install-clang-resource-headers to free up the install-clang-headers name for the new target, following the discussion on cfe-dev [1]. I didn't find any bots on zorg referencing install-clang-headers. I'll send out another PSA to cfe-dev to accompany this rename. [1] http://lists.llvm.org/pipermail/cfe-dev/2019-February/061365.html Reviewers: beanz, phosek, tstellar, rnk, dim, serge-sans-paille Subscribers: mgorny, javed.absar, jdoerfert, #sanitizers, openmp-commits, lldb-commits, cfe-commits, llvm-commits Tags: #clang, #sanitizers, #lldb, #openmp, #llvm Differential Revision: https://reviews.llvm.org/D58791 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@355340 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-15[OpenMP][Cmake] Allowed OpenMP testing detect test compiler with same generatorJonathan Peyton
Fix ninja build detect test compiler failed under windows. Patch by Peiyuan Song Differential Revision: https://reviews.llvm.org/D53479 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@351223 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-11[cmake] Use -std=gnu++11 to fix alloca() on NetBSDMichal Gorny
Prefer using '-std=gnu++11' over '-std=c++11' when available, as NetBSD exposes the correct alloca() implementation only with gnu* C/C++ standards. Differential Revision: https://reviews.llvm.org/D55477 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@348854 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-28[libomptarget-nvptx] Add testing infrastructureJonas Hahnfeld
This patch also introduces testing for libomptarget-nvptx which has been missing until now. I propose to add tests for all bugs that are fixed in the future. The target check-libomptarget-nvptx is not run by default because - we can't determine if there is a GPU plugged into the system. - it will require the latest Clang compiler. Keeping compatibility with older releases would prevent testing newer code generation developed in trunk. Differential Revision: https://reviews.llvm.org/D51687 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@343324 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-02[OpenMP] Fix doacross testing for gccJonathan Peyton
This patch adds a test using the doacross clauses in OpenMP and removes gcc from testing kmp_doacross_check.c which is only testing the kmp rather than the gomp interface. Differential Revision: https://reviews.llvm.org/D50014 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@338757 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-15[CMake] Add -fno-experimental-isel for testingJonas Hahnfeld
GlobalISel doesn't yet implement blockaddress and falls back to SelectionDAG. This results in additional branch instruction to the next basic block which breaks the OMPT tests. Disable GlobalISel for now when compiling the tests because fixing them is not easily possible. See http://llvm.org/PR36313 for full discussion history. Differential Revision: https://reviews.llvm.org/D43195 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@325218 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-21[OMPT] Add annotations to testcases that are expected to fail when using ↵Joachim Protze
certain compilers Reasons for expected failures are mainly bugs when using lables in OpenMP regions or missing support of some OpenMP features. For some worksharing clauses, support to distinguish the kind of workshare was added just recently. If an issue was fixed in a minor release version of a compiler, we flag the test as unsupported for this compiler version to avoid false positives. Same for fixes that where backported to older compiler versions. Differential Revision: https://reviews.llvm.org/D40384 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@321262 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-08[CMake] Remove legacy LIBOMP_LIT_ARGSJonas Hahnfeld
The bots have been updated, this option isn't needed anymore. git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@320153 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-30[CMake] Detect information about test compilerJonas Hahnfeld
Perform a nested CMake invocation to avoid writing our own parser for compiler versions when we are not testing the in-tree compiler. Use the extracted information to mark a test as unsupported that hangs with Clang prior to version 4.0.1 and restrict tests for libomptarget to Clang version 6.0.0 and later. Differential Revision: https://reviews.llvm.org/D40083 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@319448 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-29[CMake] Refactor testing infrastructureJonas Hahnfeld
The code for the two OpenMP runtime libraries was very similar. Move to common CMake file that is included and provides a simple interface for adding testsuites. Also add a common check-openmp target that runs all testsuites that have been registered. Note that this renames all test options to the common OPENMP namespace, for example OPENMP_TEST_C_COMPILER instead of LIBOMP_TEST_COMPILER and so on. Differential Revision: https://reviews.llvm.org/D40082 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@319343 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-29[CMake] Refactor common settings and flagsJonas Hahnfeld
These are needed by both libraries, so we can do that in a common namespace and unify configuration parameters. Also make sure that the user isn't requesting libomptarget if the library cannot be built on the system. Issue an error in that case. Differential Revision: https://reviews.llvm.org/D40081 git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@319342 91177308-0d34-0410-b5e6-96231b3b80d8