[Openmp-commits] [PATCH] D59451: Fix gettid warnings and one test on FreeBSD
Jonas Hahnfeld via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Sun Mar 24 09:49:08 PDT 2019
Hahnfeld requested changes to this revision.
Hahnfeld added a comment.
This revision now requires changes to proceed.
The code in `cmake/OpenMPTesting.cmake` should also handle standalone builds of `openmp`.
================
Comment at: cmake/OpenMPTesting.cmake:125-130
+ # Unfortunately the top-level cmake/config-ix.cmake file mangles CMake's
+ # CMAKE_THREAD_LIBS_INIT variable from the FindThreads package, so work
+ # around that, until it is fixed there.
+ if(${CMAKE_THREAD_LIBS_INIT} STREQUAL "-lpthread")
+ set(OPENMP_TEST_COMPILER_OPENMP_FLAGS "${OPENMP_TEST_COMPILER_OPENMP_FLAGS} -pthread")
+ endif()
----------------
What if the top-level logic is fixed? I think we should also consider the case that `CMAKE_THREAD_LIBS_INIT` correctly says `-pthread` and add the flag accordingly.
Repository:
rOMP OpenMP
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59451/new/
https://reviews.llvm.org/D59451
More information about the Openmp-commits
mailing list