Commit Graph

2 Commits

Author SHA1 Message Date
ClausKlein
461ae86e6f GenerateExportHeader: Suppress clang-tidy warning
Add `NOLINT` for `unconditional-preprocessor-if` in generated files.
2024-04-10 16:43:48 -04:00
Corentin Damman
1e19936320 GenerateExportHeader: Fix Clang support on Windows
When using Clang with Visual Studio, the GenerateExportHeader function
generates the DEPRECATED definition "__attribute__ ((__deprecated__))",
because Clang can compile such instruction. However, if a user wants to compile
the library with this generated header with MSVC, the declaration is not valid.

We suggest to always use the DEPRECATED definition "__declspec(deprecated)" on
Windows, which is valid for both Clang and MSVC.
2023-02-23 09:19:06 +01:00