* Recommend LSP's in development docs
Per conversation in #3338.
There are already a lot of documented compile options so I think we're
better off suggesting that everybody create a compile_commands.json
whether or not they're using an LSP because it doesn't cost much.
While I was at it it seemed reasonable to mention rust LSP too. Now that
rls is deprecated I'm not sure there is any competitor to rust-analyzer
worth mentioning.
* Export compile commands by default.
Thanks to @felixschurk for the idea and telling me how to do it.
It took me a minute to figure out that this places the
compile_commands.json in the build directory rather than the root of the
project. But clangd still finds it there and that's a better place for
it anyway.
This adds a description as well as the homepage to the CMake settings.
Further it would also now use the numbering cheme as supposed to in
CMake, this way other people could now pin a specific version if
taskwarrior is included in another project.
Documentation from CMake is https://cmake.org/cmake/help/latest/command/project.html
* update build instructions
Usage of "modern" CMake syntax and using specific out of source build.
Further add example on how to build in parallel, build a specific target
and how to change the compiler.
This closes#3236.
* Disable return-type-c-linkage warning on Clang.
This is emitted by the compiler when it can't tell if the incomplete
type being returned is a C++ type, which might not have a C-compatible
layout. In `taskchampion.h`, the types are not C++ types so this is not
an issue and the warning is unnecessary.
* Use an if instead
Fancy generator expressions appear to not work.
* Try some different CMake syntax
This removes use of gnutls and the TLS implementation, which is no
longer needed (task synchronization is handled via Taskchampion, which
uses `reqwest`, which handles TLS via other Rust dependencies). This
incidentally removes the following config options:
* `debug.tls`
* `taskd.ca`
* `taskd.certificate`
* `taskd.ciphers`
* `taskd.credentials`
* `taskd.key`
* `taskd.server`
* `taskd.trust`
This uses CMake to build a simple Rust library (in `src/tc/rust`) that
just re-exports everything from the `taskchampion-lib` crate.
The C++ wrappers then wrap this into C++ objects with proper lifecycle
maintenance, in the `tc` namespace.
The C++ wrappers are incomplete, and missing methods are tagged with
"TODO". These will be added as needed.
This allows us to conveniently review PRs for libshared using
make LIBPR=62 review
and taskwarrior PRs that require libshared PRs as well using
make PR=2189 LIBPR=63 review
Some Darwin users (for example, users on pre-OS X 10.7 systems) use
FSF GCC releases instead of Clang; hardcoding the -stdlib=libc++ flag
causes the build to fail for them. Instead, pass this whenever Clang
is used.