Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[llvm-openmp,openmp] add a meta-package for OpenMP #39389

Draft
wants to merge 46 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
15601a2
[llvm-openmp] new port
valgur Jun 14, 2024
9d4762e
[openmp] new meta-package
valgur Jun 19, 2024
d604a38
[dmlc] add openmp dependency as a test
valgur Jun 19, 2024
02de561
vdb
valgur Jun 19, 2024
c706c61
[llvm-openmp] fix portfile.cmake issue
valgur Jun 19, 2024
2b82509
vdb
valgur Jun 19, 2024
56d87ef
[dmlc] add missing dependency to installed config
valgur Jun 19, 2024
7147c2a
vdb
valgur Jun 19, 2024
093f31f
[llvm-openmp] disable unsupported i18n on Android
valgur Jun 19, 2024
3923506
vdb
valgur Jun 19, 2024
a5e393d
[llvm-openmp] fixes for AppleClang
valgur Jun 19, 2024
53dfe61
vdb
valgur Jun 19, 2024
a5e43c0
[llvm-openmp] add gettext-libintl for Android
valgur Jun 19, 2024
200dde7
vdb
valgur Jun 19, 2024
a69c5ba
[llvm-openmp] fix a CMake error
valgur Jun 19, 2024
aa78b5f
vdb
valgur Jun 19, 2024
c963fd9
[llvm-openmp] Android is not supported due to nl_types.h
valgur Jun 19, 2024
5c8c4ed
vdb
valgur Jun 19, 2024
69c8752
[llvm-openmp] temporarily always use llvm-openmp for testing
valgur Jun 19, 2024
eb1057c
vdb
valgur Jun 19, 2024
2bd4b35
[llvm-openmp] only shared builds are supported by the project on Windows
valgur Jun 20, 2024
0ff691a
vdb
valgur Jun 20, 2024
7b7d2d3
[llvm-openmp] add ONLY_DYNAMIC_CRT
valgur Jun 20, 2024
50bd3bf
vdb
valgur Jun 20, 2024
1d69490
[llvm-openmp] remove unnecessary CACHE var
valgur Jun 20, 2024
d2f69f6
[llvm-openmp] force shared on Windows
valgur Jun 20, 2024
e966c87
vdb
valgur Jun 20, 2024
eac6142
[llvm-openmp] try a different patch for Windows import lib issue
valgur Jun 21, 2024
a7fa2b2
vdb
valgur Jun 21, 2024
1f9fbe6
[llvm-openmp] Fix Windows build
valgur Jul 3, 2024
5d26728
vdb
valgur Jul 3, 2024
ee6c93d
[llvm-openmp] disable windows-static and uwp in supports
valgur Jul 4, 2024
58ffc59
vdp
valgur Jul 4, 2024
c929c14
[llvm-openmp] Export 'omp' target without a namespace to match the 'l…
valgur Jul 4, 2024
1222ca9
[llvm-openmp] Export CMake vars
valgur Jul 4, 2024
6d20fe8
[llvm-openmp] Bump to v18.1.8
valgur Jul 4, 2024
2d9775a
[llvm-openmp] Place omp.h under a subdirectory to avoid conflicts
valgur Jul 4, 2024
a8bcff8
[llvm-openmp] remove `REQUIRED` from FindOpenMP.cmake.in
valgur Jul 5, 2024
95280e1
[llvm-openmp] install libs in an 'unofficial-llvm-openmp' subdir to a…
valgur Jul 6, 2024
e297073
vdb
valgur Jul 7, 2024
78ffd23
[openmp] Use llvm-openmp only for Clang and AppleClang
valgur Jul 8, 2024
535de03
vdb
valgur Jul 8, 2024
5e22a88
Add usage info
valgur Jul 8, 2024
5e358cd
vdb
valgur Jul 8, 2024
710ed57
[llvm-openmp] Fix Windows static triplet support
valgur Jul 8, 2024
1c2ab7b
vdb
valgur Jul 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions ports/openmp/vcpkg-cmake-wrapper.cmake
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New ports are not allowed to add wrapper files anymore, and as additional information, compiler condition is not allowed in portfile.cmake, it could be determined in the CMakeLists.txt of project.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New ports are not allowed to add wrapper files anymore

Could you be more specific?
FindOpenMP.cmake is an official CMake Find module. That's the case where wrappers might be appropriate.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not quite sure how to modify it.
@data-queue Could you help to take a look? Thanks.

Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Uses llvm-openmp from Vcpkg for Clang and AppleClang and the native OpenMP implementation for all other compilers.

set(_CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}")
# if(CMAKE_CXX_COMPILER_ID MATCHES "^(Clang|AppleClang)$")
if(CMAKE_CXX_COMPILER_ID MATCHES "^(Clang|AppleClang)$")
Copy link
Contributor

@cenit cenit Jul 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so how to use it also with MSVC, if I would like to?
There should be a "bypass" variable maybe? something like "...OR Z_VCPKG_USE_LLVM_OPENMP)"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Realistically, you should probably simply use the LLVM OpenMP implementation included with MSVC, available by setting /openmp:llvm or OpenMP_RUNTIME_MSVC=llvm in CMake.
I can add something like Z_VCPKG_OPENMP=llvm for example, but unless it's exposed as a feature of the port, the user will have to take care to either set it globally or set it in the installed config, which feels a bit fragile. And using features to implement alternatives does not work well and is strongly discouraged.

list(PREPEND CMAKE_MODULE_PATH "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/llvm-openmp")
# endif()
endif()
_find_package(${ARGS})
set(CMAKE_MODULE_PATH "${_CMAKE_MODULE_PATH}")
4 changes: 2 additions & 2 deletions ports/openmp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "openmp",
"version-date": "2024-06-19",
"version-date": "2024-07-08",
"description": "Metapackage for OpenMP libraries",
"license": null,
"dependencies": [
{
"name": "llvm-openmp",
"platform": "!android"
"platform": "!android & !(windows & static) & !uwp"
valgur marked this conversation as resolved.
Show resolved Hide resolved
},
{
"name": "vcpkg-cmake",
Expand Down