CMake install (TARGETS in subdirectories)

According to this bugreport, install(TARGETS) command flow accepts only targets created within the same directory. So you need either move the add_library() call into the top-level directory, or split install(TARGETS) call into per-target ones, and move each of them into the corresponding subdirectory. Since CMake 3.13 install(TARGETS) can work even with targets created in other … Read more

Linking using g++ fails searching for -lstdc++

Posting for future reference, a solution I found was to install g++-multilib. I had the same incompatible problem relating to -lstdc++ on g++ version 4.6.1 On further probing: g++-multilib is a dummy package which installed g++4.6-multilib which in turn installed the appropriate libstdc++.so under the /usr/lib/gcc/x86_64-linux-gnu/4.6/32 folder.

How to trace Makefile targets for troubleshooting?

Use make -d or make –debug[=flags] options: ‘-d’ Print debugging information in addition to normal processing. The debugging information says which files are being considered for remaking, which file-times are being compared and with what results, which files actually need to be remade, which implicit rules are considered and which are applied—everything interesting about how … Read more