I am trying to figure out, how do I include one single library into the compilation of my project - while ignoring others.
I have two projects that share a git submodule and inside the git submodule there are two libraries
library_submodule/
├─ .gitlab-ci.yml
├─ docs/
├─ lib/
│ ├─ LEDController/
│ │ ├─ LEDController.cpp
│ │ ├─ LEDController.h
│ ├─ LockGuard/
│ │ ├─ LockGuard.cpp
│ │ ├─ LockGuard.h
│ ├─ mylibc/
│ │ ├─ include
│ │ │ ├─ mystring.h
│ │ ├─ string
│ │ │ ├─ mystrncpy.cpp
├─ lib_for_unit_testing/
│ ├─ LEDController/
│ │ ├─ LEDController.cpp
│ │ ├─ LEDController.h
Basically, I want to include everything in library_submodule/lib
except for LEDController since it has some dependencies that I cannot include. I instead want to use the LEDController in library_submodule/lib_for_unit_testing
since it’s minimal.
How do I include just the ones I want? I have tried -I./library_submodule/lib/LockGuard
but it only includes the header and I get a linker error. How do I get Lockguard.cpp to be included in compilation?
Unfortunately, the folder structure is a bit fixed and, I can’t use lib_ignore = LEDController
because, in this case, I still need LEDController but just from a different path.
Thanks