diff options
author | Tony Theodore <tonyt@logyst.com> | 2015-10-27 02:58:22 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2015-10-31 09:18:21 (GMT) |
commit | 05380b49b7337df2eb11f834a8a9b01b0ab1cbe7 (patch) | |
tree | 59b582107829d310691a210af3dfce3280235da1 /src/pthreads-test.cmake | |
parent | 0ad42f9aa49c118b34fdd324a471df38d389e6c3 (diff) | |
download | mxe-05380b49b7337df2eb11f834a8a9b01b0ab1cbe7.zip mxe-05380b49b7337df2eb11f834a8a9b01b0ab1cbe7.tar.gz mxe-05380b49b7337df2eb11f834a8a9b01b0ab1cbe7.tar.bz2 |
gcc pthreads: build pthreads and mingw-w64 headers inline and enable libgomp
* fixes "~winpthreads changes ~pthread_signal.h" etc. reported by build-pkg
mingw-w64 installs dummy headers if winpthreads isn't built
* enables libgomp to avoid double-build (see #331)
* no change in openmp-validation (still 20 failures - taken with a grain of
salt as the batch file test runner isn't a reliable perl substitute)
* pthreads virtual package kept for future testing
Diffstat (limited to 'src/pthreads-test.cmake')
-rw-r--r-- | src/pthreads-test.cmake | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/pthreads-test.cmake b/src/pthreads-test.cmake new file mode 100644 index 0000000..f818d90 --- /dev/null +++ b/src/pthreads-test.cmake @@ -0,0 +1,18 @@ +# This file is part of MXE. +# See index.html for further information. + +# partial module - included by src/cmake/CMakeLists.txt + +set(TGT test-${PKG}-cmake) + +enable_language(C) +add_executable(${TGT} ${CMAKE_CURRENT_LIST_DIR}/pthreads-test.c) + +find_package(Threads REQUIRED) +if(Threads::Threads) # cmake 3.1.0+ + target_link_libraries(${TGT} Threads::Threads) +else() + target_link_libraries(${TGT} ${CMAKE_THREAD_LIBS_INIT}) +endif() + +install(TARGETS ${TGT} DESTINATION bin) |