Closed ivanhawkes closed 1 year ago
Here's the compiler output without the #include
Consolidate compiler generated dependencies of target libremidi
[ 2%] Building CXX object CMakeFiles/libremidi.dir/include/libremidi/client.cpp.o
In file included from /home/ivan/Projects/libremidi/include/libremidi/backends/jack/midi_in.hpp:3,
from /home/ivan/Projects/libremidi/include/libremidi/backends/jack.hpp:2,
from /home/ivan/Projects/libremidi/include/libremidi/backends.hpp:23,
from /home/ivan/Projects/libremidi/include/libremidi/client.cpp:4:
/home/ivan/Projects/libremidi/include/libremidi/backends/jack/helpers.hpp: In member function ‘void libremidi::jack_helpers::do_close_port()’:
/home/ivan/Projects/libremidi/include/libremidi/backends/jack/helpers.hpp:253:5: error: ‘assert’ was not declared in this scope
253 | assert(this->port.impl->load() == nullptr);
| ^~~~~~
/home/ivan/Projects/libremidi/include/libremidi/backends/jack/helpers.hpp:13:1: note: ‘assert’ is defined in header ‘<cassert>’; did you forget to ‘#include <cassert>’?
12 | #include <libremidi/detail/midi_in.hpp>
+++ |+#include <cassert>
13 |
make[2]: *** [CMakeFiles/libremidi.dir/build.make:132: CMakeFiles/libremidi.dir/include/libremidi/client.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:107: CMakeFiles/libremidi.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Hmm, for the CMake version I thought I had updated to 3.24 because a 3.24-level feature was used somewhere but can't remember which.. if it works ... :)
also I think the assert can just go, I had some paranoid issues when debugging something aha but looking at the code, it's unnecessary
Apparently it's fine with the slightly lower version of cmake. I've been known to be over-zealous with checks myself.
The master branch won't build on a stock Ubuntu 22.04 without a couple of changes. I dropped the CMake requirement back a couple of minor versions. I added an include to stop an error with raising asserts.
Changes:
CMake version reduced to 3.22 for Ubuntu 22.04