Fix builds for 0.7.0
Currently the builds are broken: https://travis-ci.org/github/Papierkorb/bindgen
"LLVM_VER" "GREATER_EQUAL" "10"
Unknown arguments specified
I think it caused by old CMake.
ah. yeah i ran into this somewhere else. may need to compile it
Given that @ZaWertun added the GenericVersion class which has since been used in a couple more places in bindgen/qt5, how about we simply don't make this check in cmake, but elsewhere?
One option would be to simply extend find_clang.cr so that it accepts two versions from command line and returns the result of comparison (done via GenericVersion) through its exit status.
Or another alternative could be that we ourselves detect and set the c++ standard as part of find_clang rather than expecting cmake to detect and pass it.
GREATER_EQUAL 10 was just fixed by using GREATER 9.
The issue that pops up now is:
In src/bindgen/library.cr:5:1
5 | require "json_mapping"
^
Error: can't find file 'json_mapping'
Is it possible that shards is not being run in these builds?
probably not. i probably just introduced that build bug.
Looks like builds now fail with
clang: error: -Wl,-fuse-ld=gold: 'linker' input unused [-Werror,-Wunused-command-line-argument]
The culprit may be
https://github.com/Papierkorb/bindgen/blob/3f028833f059e70b89cfa03b0686e145b70921b1/clang/find_clang.cr#L60-L63
It should be okay to drop linker flags here (-Wl,*) as the generated command line is compile-only (-c):
https://github.com/Papierkorb/bindgen/blob/3f028833f059e70b89cfa03b0686e145b70921b1/clang/find_clang.cr#L145-L147