Closed 0x47 closed 7 years ago
I suspect the problem is that YCM-Gen uses out-of-tree compilation with Cmake, and your project isn't setup to handle that. See if you can compile the project when you do the following:
$ mkdir /tmp/build
$ cd /tmp/build
$ cmake /path/to/project
$ make
After fixing the underlying problem of #88, I can no longer reproduce this issue. I assume there were hidden linker errors or something else that was fixed as a side-effect.
It seems YCM-Generator does something in-between building two targets in my CMakeLists.txt. The first target is a library which builds okay and the second target is a unit test that depends on the library (for testing it). IIRC all targets created in one project (that should even include sub-projects via
add_directory()
) in CMake know all other targets and can link against them automatically.