The source project of this merge request has been removed.
Emit symlink to compile_commands.json only with Clang
I compiled successfully the 0.10.0rc1 under:
- CYGWIN
- MINGW-W64 i686
- MINGW-W64 x86_64
I just noticed a little issue with this line:
https://gitlab.com/libssh/libssh-mirror/-/blob/master/CMakeLists.txt#L222
This line creates a link to compile_commands.json into the source directory, but this is recognized as an addition from the package manager. As result, into the "src" package there is also a 180KB patch that is the content of this compile_commands.json file, which is absolutely not needed.
As a workaround, I'm wondering if it would be possible to put something like this around the creation of that link:
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
...
endif()
Attached patch implements this fix, which seems to be the easiest workaround.
Signed-off-by: Carlo Bramini carlo_bramini@users.sourceforge.net
Checklist
-
Commits have Signed-off-by:
with name/author being identical to the commit author -
Code modified for feature -
Test suite updated with functionality tests -
Test suite updated with negative tests -
Documentation updated
Reviewer's checklist:
-
Any issues marked for closing are addressed -
There is a test suite reasonably covering new functionality or modifications -
Function naming, parameters, return values, types, etc., are consistent and according to CONTRIBUTING.md -
This feature/change has adequate documentation added -
No obvious mistakes in the code