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

Bugfix/fix clang cl #276

Merged
merged 9 commits into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@ jobs:
strategy:
matrix:
build-option: [ debug, release ]
compiler: [msvc, clang-cl]
mgovers marked this conversation as resolved.
Show resolved Hide resolved

env:
PRESET: msvc-${{ matrix.build-option }}
PRESET: ${{ matrix.compiler }}-${{ matrix.build-option }}

steps:
- uses: actions/checkout@v3
Expand All @@ -119,7 +120,7 @@ jobs:
# build
cmake --build --preset ${{ env.PRESET }} --verbose -j 1
# test
ctest --test-dir . --output-on-failure
ctest --test-dir cpp_build\${{ env.PRESET }} --output-on-failure
# install
cmake --build --preset ${{ env.PRESET }} --verbose -j 1 --target install

Expand Down
96 changes: 67 additions & 29 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,21 @@
"hidden": true
},
{
"name": "clang-tidy-base",
"name": "clang-tidy-windows-base",
"cacheVariables": {
"CMAKE_C_CLANG_TIDY": "clang-tidy.exe;--extra-arg=/EHsc",
"CMAKE_CXX_CLANG_TIDY": "clang-tidy.exe;--extra-arg=/EHsc"
},
"inherits": "windows-base",
"hidden": true
},
{
"name": "clang-tidy-unix-base",
"cacheVariables": {
"CMAKE_C_CLANG_TIDY": "$env{CLANG_TIDY}",
"CMAKE_CXX_CLANG_TIDY": "$env{CLANG_TIDY}"
},
"inherits": "unix-base",
"hidden": true
},
{
Expand All @@ -139,17 +149,22 @@
"inherits": [
"clang-cl-base",
"debug"
],
"hidden": true
]
},
{
"name": "clang-cl-release",
"displayName": "Release (Clang CL)",
"inherits": [
"clang-cl-base",
"release"
],
"hidden": true
]
},
{
"name": "clang-debug",
"inherits": [
"debug",
"unix-sanitizer"
]
},
{
"name": "clang-release",
Expand All @@ -159,26 +174,33 @@
]
},
{
"name": "clang-debug",
"name": "clang-tidy-debug",
"inherits": [
"debug",
"unix-sanitizer"
"clang-tidy-unix-base"
]
},
{
"name": "clang-tidy-release",
"inherits": [
"release",
"clang-tidy-base",
"unix-base"
"clang-tidy-unix-base"
]
},
{
"name": "clang-tidy-debug",
"name": "clang-tidy-windows-debug",
"displayName": "Debug (Clang CL + Clang Tidy)",
"inherits": [
"debug",
"clang-tidy-base",
"unix-base"
"clang-tidy-windows-base"
]
},
{
"name": "clang-tidy-windows-release",
"displayName": "Release (Clang CL + Clang Tidy)",
"inherits": [
"release",
"clang-tidy-windows-base"
]
},
{
Expand All @@ -190,23 +212,19 @@
"hidden": true
},
{
"name": "gcc-release",
"name": "gcc-debug",
"inherits": [
"release",
"debug",
"gcc-base"
]
},
{
"name": "gcc-debug",
"name": "gcc-release",
"inherits": [
"debug",
"release",
"gcc-base"
]
},
{
"name": "ci-clang-release",
"inherits": "clang-release"
},
{
"name": "ci-clang-debug",
"inherits": [
Expand All @@ -215,11 +233,8 @@
]
},
{
"name": "ci-gcc-release",
"inherits": [
"gcc-release",
"unix-coverage"
]
"name": "ci-clang-release",
"inherits": "clang-release"
},
{
"name": "ci-gcc-debug",
Expand All @@ -231,20 +246,27 @@
"unix-coverage"
]
},
{
"name": "ci-gcc-release",
"inherits": [
"gcc-release",
"unix-coverage"
]
},
{
"name": "ci-sonar",
"inherits": [
"unix-coverage",
"debug"
]
},
{
"name": "ci-clang-tidy-release",
"inherits": "clang-tidy-release"
},
{
"name": "ci-clang-tidy-debug",
"inherits": "clang-tidy-debug"
},
{
"name": "ci-clang-tidy-release",
"inherits": "clang-tidy-release"
}
],
"buildPresets": [
Expand Down Expand Up @@ -280,6 +302,14 @@
"name": "clang-tidy-release",
"configurePreset": "clang-tidy-release"
},
{
"name": "clang-tidy-windows-debug",
"configurePreset": "clang-tidy-windows-debug"
},
{
"name": "clang-tidy-windows-release",
"configurePreset": "clang-tidy-windows-release"
},
{
"name": "gcc-debug",
"configurePreset": "gcc-debug"
Expand Down Expand Up @@ -350,6 +380,14 @@
"name": "clang-tidy-release",
"configurePreset": "clang-tidy-release"
},
{
"name": "clang-tidy-windows-debug",
"configurePreset": "clang-tidy-windows-debug"
},
{
"name": "clang-tidy-windows-release",
"configurePreset": "clang-tidy-windows-release"
},
{
"name": "gcc-debug",
"configurePreset": "gcc-debug"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct get_meta<{{ attribute_class.name }}> {
meta.attributes = get_meta<{{ attribute_class.base }}>{}().attributes;
{%- endif -%}
{% for attribute in attribute_class.attributes %}
meta.attributes.push_back(get_data_attribute<&{{ attribute_class.full_name }}::{{ attribute.names }}>("{{ attribute.names }}"));
meta.attributes.push_back(get_data_attribute<{{ attribute_class.full_name }}, &{{ attribute_class.full_name }}::{{ attribute.names }}>("{{ attribute.names }}"));
{%- endfor %}
return meta;
}
Expand Down
2 changes: 2 additions & 0 deletions docs/advanced_documentation/build-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ You can define the environment variable `CXX` to for example `clang++` to specif

* MSVC >= 17.5
* Latest release tested in CI (e.g. Visual Studio 2022, IDE or build tools)
* Clang CL >= 14.0
* Latest release tested in CI (e.g. Visual Studio 2022, IDE or build tools)

**macOS**

Expand Down