I am building my static library using the object libraries as shown using CMake 3.1.3.
I have
ADD_SUBDIRECTORY(A)
ADD_SUBDIRECTORY(B)
....
ADD_LIBRARY(mylib STATIC ${SOURCES}
$<TARGET_OBJECTS:A>
$<TARGET_OBJECTS:B> )
SET_TARGET_PROPERTIES(mylib PROPERTIES COMPILE_PDB_NAME mylib COMPILE_PDB_OUTPUT_DIR ${CMAKE_BINARY_DIR})
Now, my problem is A generates vc120.pdb in A's CMake subdirectory. B generates its own vc120.pdb in B's CMake subdirectory. And, mylib generates mylib.pdb in the main binary cmake folder.
I only want one static library and one pdb file. I just want mylib and mylib.pdb.
How can I merge all the vc120.pdbs into mylib.pdb or ideally just generate only one pdb file?