I’ve made a build system for using CMake (with Clang) by copying across the one for Makefiles, but the ‘file_regex’ is tripping up sometimes with what appear to be multi-line matches.
For example, with the following build output:
16%] Building CXX object CMakeFiles/ray.dir/src/main.cpp.o
/home/rezzie/ray/src/main.cpp:27:4: error: use of undeclared identifier 'Camera'
Camera cam;
^
/home/rezzie/ray/src/main.cpp:105:4: error: expected unqualified-id
return EXIT_SUCCESS;
The first error doesn’t work, as the regex highlights the " 16%] Building …" line and then the file path, up to the ‘27:4’. The second error is picked up correctly; I’m guessing because it’s not preceded by a “Building” line.
Can someone help me modify the regex so it’ll work with Clang/CMake output? It’s currently:
^(..^:]*):([0-9]+):?([0-9]+)?:? (.*)$
Thanks!