team-charls / charls

CharLS, a C++ JPEG-LS library implementation
BSD 3-Clause "New" or "Revised" License
187 stars 74 forks source link

Rename headers from .h to .hpp to identify CharLS as a C++ project #322

Closed vbaderks closed 2 months ago

vbaderks commented 2 months ago

To make it more clear to users and tooling that the project is a C++ project use the extension .hpp for pure C++ headers. Add a new public header file charls.hpp. External C++ projects should this header file, C projects should still use charls.h.

sonarcloud[bot] commented 2 months ago

Quality Gate Failed Quality Gate failed

Failed conditions
D Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

stefan523 commented 1 month ago

I believe the new header file "undef_macros.h" needs to be added to CMakeLists.txt in order to be installed properly using cmake.

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d527c80..7f58a8c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -81,6 +81,7 @@ set(HEADERS
     "include/charls/jpegls_error.h"
     "include/charls/jpegls_error.hpp"
     "include/charls/public_types.h"
+    "include/charls/undef_macros.h"
     "include/charls/validate_spiff_header.h"
     "include/charls/version.h"
 )

Thank you for all the efforts/contributions!

vbaderks commented 1 month ago

Hi @stefan523, Thanks for the problem report. This has been resolved with #333